Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
bae94e6d
Commit
bae94e6d
authored
Oct 09, 2022
by
Frederick Liu
Committed by
A. Unique TensorFlower
Oct 09, 2022
Browse files
[kernel] fix test head shape. This does not cause an error because we overwirte the cache.
PiperOrigin-RevId: 479993154
parent
38c61e26
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
official/nlp/modeling/layers/kernel_attention_test.py
official/nlp/modeling/layers/kernel_attention_test.py
+1
-1
No files found.
official/nlp/modeling/layers/kernel_attention_test.py
View file @
bae94e6d
...
@@ -71,7 +71,7 @@ class KernelAttentionTest(tf.test.TestCase, parameterized.TestCase):
...
@@ -71,7 +71,7 @@ class KernelAttentionTest(tf.test.TestCase, parameterized.TestCase):
kv_cache
=
tf
.
zeros
(
kv_cache
=
tf
.
zeros
(
(
batch_size
,
num_heads
,
key_dim
,
(
batch_size
,
num_heads
,
key_dim
,
num_random_features
if
num_random_features
>
0
else
key_dim
))
num_random_features
if
num_random_features
>
0
else
key_dim
))
k_sum_cache
=
tf
.
zeros
((
batch_size
,
1
,
key_dim
))
k_sum_cache
=
tf
.
zeros
((
batch_size
,
num_heads
,
key_dim
))
stream_output
=
[]
stream_output
=
[]
cache
=
{
"kv"
:
kv_cache
,
"k_sum"
:
k_sum_cache
}
cache
=
{
"kv"
:
kv_cache
,
"k_sum"
:
k_sum_cache
}
for
i
in
range
(
num_chunks
):
for
i
in
range
(
num_chunks
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment