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
4e3e5fab
Commit
4e3e5fab
authored
Oct 23, 2020
by
A. Unique TensorFlower
Browse files
Do not create embedding projection attr if it is None, for backwards compatibility.
PiperOrigin-RevId: 338786173
parent
f5a1343f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
official/nlp/keras_nlp/encoders/bert_encoder.py
official/nlp/keras_nlp/encoders/bert_encoder.py
+2
-1
No files found.
official/nlp/keras_nlp/encoders/bert_encoder.py
View file @
4e3e5fab
...
...
@@ -226,6 +226,7 @@ class BertEncoder(tf.keras.Model):
self
.
_embedding_layer
=
embedding_layer_inst
self
.
_position_embedding_layer
=
position_embedding_layer
self
.
_type_embedding_layer
=
type_embedding_layer
if
embedding_projection
is
not
None
:
self
.
_embedding_projection
=
embedding_projection
def
get_embedding_table
(
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