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
53f76b23
Commit
53f76b23
authored
Oct 26, 2020
by
A. Unique TensorFlower
Browse files
Make 'embedding_layer' an optional config field for backwards compatibility.
PiperOrigin-RevId: 339090333
parent
cd5e1204
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
official/nlp/keras_nlp/encoders/bert_encoder.py
official/nlp/keras_nlp/encoders/bert_encoder.py
+1
-1
No files found.
official/nlp/keras_nlp/encoders/bert_encoder.py
View file @
53f76b23
...
...
@@ -250,7 +250,7 @@ class BertEncoder(tf.keras.Model):
@
classmethod
def
from_config
(
cls
,
config
,
custom_objects
=
None
):
if
config
[
'embedding_layer'
]
is
not
None
:
if
'embedding_layer'
in
config
and
config
[
'embedding_layer'
]
is
not
None
:
warn_string
=
(
'You are reloading a model that was saved with a '
'potentially-shared embedding layer object. If you contine to '
...
...
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