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
d4bc6160
Commit
d4bc6160
authored
Aug 11, 2021
by
Sagun Bajra
Committed by
A. Unique TensorFlower
Aug 11, 2021
Browse files
Internal change
PiperOrigin-RevId: 390202261
parent
ba543977
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
official/nlp/keras_nlp/layers/position_embedding.py
official/nlp/keras_nlp/layers/position_embedding.py
+1
-7
No files found.
official/nlp/keras_nlp/layers/position_embedding.py
View file @
d4bc6160
...
@@ -66,14 +66,8 @@ class PositionEmbedding(tf.keras.layers.Layer):
...
@@ -66,14 +66,8 @@ class PositionEmbedding(tf.keras.layers.Layer):
def
build
(
self
,
input_shape
):
def
build
(
self
,
input_shape
):
dimension_list
=
input_shape
.
as_list
()
dimension_list
=
input_shape
.
as_list
()
seq_length
=
dimension_list
[
self
.
_seq_axis
]
width
=
dimension_list
[
-
1
]
width
=
dimension_list
[
-
1
]
if
self
.
_max_length
is
not
None
:
weight_sequence_length
=
self
.
_max_length
weight_sequence_length
=
self
.
_max_length
else
:
weight_sequence_length
=
seq_length
self
.
_position_embeddings
=
self
.
add_weight
(
self
.
_position_embeddings
=
self
.
add_weight
(
"embeddings"
,
"embeddings"
,
...
...
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