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
7b129e6b
Commit
7b129e6b
authored
Sep 28, 2022
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Sep 28, 2022
Browse files
Internal change
PiperOrigin-RevId: 477574174
parent
89bd20c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
official/nlp/modeling/layers/transformer_scaffold.py
official/nlp/modeling/layers/transformer_scaffold.py
+3
-1
No files found.
official/nlp/modeling/layers/transformer_scaffold.py
View file @
7b129e6b
...
@@ -335,7 +335,9 @@ class TransformerScaffold(tf.keras.layers.Layer):
...
@@ -335,7 +335,9 @@ class TransformerScaffold(tf.keras.layers.Layer):
training
=
training
)
training
=
training
)
layer_output
+=
source_attention_output
layer_output
+=
source_attention_output
else
:
else
:
# if not norm_first, assume that the feedforwad does apply layer norm
# Attention: if not norm_first, assume that the feedforwad does apply
# layer norm. The feedford also apply residual connection. Please
# read the `GatedFeedforward` as a concrete example.
layer_output
=
self
.
_feedforward_block
(
attention_output
,
layer_output
=
self
.
_feedforward_block
(
attention_output
,
training
=
training
)
training
=
training
)
...
...
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