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
36d27f01
Commit
36d27f01
authored
May 11, 2020
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 310981542
parent
ebc3edc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
official/nlp/transformer/attention_layer.py
official/nlp/transformer/attention_layer.py
+1
-1
No files found.
official/nlp/transformer/attention_layer.py
View file @
36d27f01
...
...
@@ -54,7 +54,7 @@ class Attention(tf.keras.layers.Layer):
limit
=
math
.
sqrt
(
6.0
/
(
fan_in
+
fan_out
))
return
tf
.
keras
.
initializers
.
RandomUniform
(
minval
=-
limit
,
maxval
=
limit
)
attention_initializer
=
_glorot_initializer
(
input_shape
[
-
1
],
attention_initializer
=
_glorot_initializer
(
input_shape
.
as_list
()
[
-
1
],
self
.
hidden_size
)
self
.
query_dense_layer
=
layers
.
DenseEinsum
(
output_shape
=
(
self
.
num_heads
,
size_per_head
),
...
...
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