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
601daf54
Commit
601daf54
authored
Aug 07, 2020
by
xinliupitt
Browse files
initializers.serialize
parent
9575381a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
official/nlp/modeling/layers/transformer.py
official/nlp/modeling/layers/transformer.py
+2
-2
No files found.
official/nlp/modeling/layers/transformer.py
View file @
601daf54
...
...
@@ -223,7 +223,7 @@ class Transformer(tf.keras.layers.Layer):
"intermediate_dropout"
:
self
.
_intermediate_dropout
,
"attention_initializer"
:
tf
.
keras
.
constraint
s
.
serialize
(
self
.
_attention_initializer
)
tf
.
keras
.
initializer
s
.
serialize
(
self
.
_attention_initializer
)
}
base_config
=
super
(
Transformer
,
self
).
get_config
()
return
dict
(
list
(
base_config
.
items
())
+
list
(
config
.
items
()))
...
...
@@ -486,7 +486,7 @@ class TransformerDecoderLayer(tf.keras.layers.Layer):
"intermediate_dropout"
:
self
.
_intermediate_dropout
,
"attention_initializer"
:
tf
.
keras
.
constraint
s
.
serialize
(
self
.
_attention_initializer
)
tf
.
keras
.
initializer
s
.
serialize
(
self
.
_attention_initializer
)
}
base_config
=
super
(
TransformerDecoderLayer
,
self
).
get_config
()
return
dict
(
list
(
base_config
.
items
())
+
list
(
config
.
items
()))
...
...
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