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
7e4837c2
Commit
7e4837c2
authored
Aug 09, 2020
by
xinliupitt
Browse files
indent
parent
37e7a323
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
official/nlp/modeling/models/seq2seq_transformer.py
official/nlp/modeling/models/seq2seq_transformer.py
+36
-36
No files found.
official/nlp/modeling/models/seq2seq_transformer.py
View file @
7e4837c2
...
...
@@ -432,24 +432,24 @@ class TransformerEncoder(tf.keras.layers.Layer):
return
{
"num_layers"
:
self
.
_num_layers
,
"num_attention_heads"
:
self
.
_num_attention_heads
,
"intermediate_size"
:
self
.
_intermediate_size
,
"activation"
:
self
.
_activation
,
"dropout_rate"
:
self
.
_dropout_rate
,
"attention_dropout_rate"
:
self
.
_attention_dropout_rate
,
"use_bias"
:
self
.
_use_bias
,
"norm_first"
:
self
.
_norm_first
,
"norm_epsilon"
:
self
.
_norm_epsilon
,
"intermediate_dropout"
:
self
.
_intermediate_dropout
"num_attention_heads"
:
self
.
_num_attention_heads
,
"intermediate_size"
:
self
.
_intermediate_size
,
"activation"
:
self
.
_activation
,
"dropout_rate"
:
self
.
_dropout_rate
,
"attention_dropout_rate"
:
self
.
_attention_dropout_rate
,
"use_bias"
:
self
.
_use_bias
,
"norm_first"
:
self
.
_norm_first
,
"norm_epsilon"
:
self
.
_norm_epsilon
,
"intermediate_dropout"
:
self
.
_intermediate_dropout
}
def
call
(
self
,
...
...
@@ -547,24 +547,24 @@ class TransformerDecoder(tf.keras.layers.Layer):
return
{
"num_layers"
:
self
.
_num_layers
,
"num_attention_heads"
:
self
.
_num_attention_heads
,
"intermediate_size"
:
self
.
_intermediate_size
,
"activation"
:
self
.
_activation
,
"dropout_rate"
:
self
.
_dropout_rate
,
"attention_dropout_rate"
:
self
.
_attention_dropout_rate
,
"use_bias"
:
self
.
_use_bias
,
"norm_first"
:
self
.
_norm_first
,
"norm_epsilon"
:
self
.
_norm_epsilon
,
"intermediate_dropout"
:
self
.
_intermediate_dropout
"num_attention_heads"
:
self
.
_num_attention_heads
,
"intermediate_size"
:
self
.
_intermediate_size
,
"activation"
:
self
.
_activation
,
"dropout_rate"
:
self
.
_dropout_rate
,
"attention_dropout_rate"
:
self
.
_attention_dropout_rate
,
"use_bias"
:
self
.
_use_bias
,
"norm_first"
:
self
.
_norm_first
,
"norm_epsilon"
:
self
.
_norm_epsilon
,
"intermediate_dropout"
:
self
.
_intermediate_dropout
}
def
call
(
self
,
...
...
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