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
2cad427b
"git@developer.sourcefind.cn:change/sglang.git" did not exist on "8c9670375f80b3a5bdc688912809f7f65bfc3487"
Commit
2cad427b
authored
Oct 01, 2020
by
Chen Chen
Committed by
A. Unique TensorFlower
Oct 01, 2020
Browse files
internal change
PiperOrigin-RevId: 334829363
parent
ad0b28c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
official/nlp/keras_nlp/layers/masked_lm.py
official/nlp/keras_nlp/layers/masked_lm.py
+1
-2
No files found.
official/nlp/keras_nlp/layers/masked_lm.py
View file @
2cad427b
...
...
@@ -81,8 +81,7 @@ class MaskedLM(tf.keras.layers.Layer):
lm_data
=
self
.
layer_norm
(
lm_data
)
lm_data
=
tf
.
matmul
(
lm_data
,
self
.
embedding_table
,
transpose_b
=
True
)
logits
=
tf
.
nn
.
bias_add
(
lm_data
,
self
.
bias
)
masked_positions_length
=
masked_positions
.
shape
[
1
]
or
tf
.
shape
(
masked_positions_length
=
masked_positions
.
shape
.
as_list
()[
1
]
or
tf
.
shape
(
masked_positions
)[
1
]
logits
=
tf
.
reshape
(
logits
,
[
-
1
,
masked_positions_length
,
self
.
_vocab_size
])
...
...
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