Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
a5327c6a
Unverified
Commit
a5327c6a
authored
Jan 16, 2023
by
Susnato Dhar
Committed by
GitHub
Jan 16, 2023
Browse files
Fixed issue #21053 (#21065)
Co-authored-by: susnato <susnato@tensorflow123456@gmail.com>
parent
488a179c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/gpt2/modeling_tf_gpt2.py
src/transformers/models/gpt2/modeling_tf_gpt2.py
+1
-1
No files found.
src/transformers/models/gpt2/modeling_tf_gpt2.py
View file @
a5327c6a
...
@@ -446,7 +446,7 @@ class TFGPT2MainLayer(tf.keras.layers.Layer):
...
@@ -446,7 +446,7 @@ class TFGPT2MainLayer(tf.keras.layers.Layer):
# indices on GPU, returning zeros instead. This is a dangerous silent behavior.
# indices on GPU, returning zeros instead. This is a dangerous silent behavior.
tf
.
debugging
.
assert_less
(
tf
.
debugging
.
assert_less
(
input_ids
,
input_ids
,
tf
.
cast
(
self
.
vocab_size
,
dtype
=
input_ids
.
dtype
),
tf
.
cast
(
self
.
config
.
vocab_size
,
dtype
=
input_ids
.
dtype
),
message
=
(
message
=
(
"input_ids must be smaller than the embedding layer's input dimension (got"
"input_ids must be smaller than the embedding layer's input dimension (got"
f
"
{
tf
.
math
.
reduce_max
(
input_ids
)
}
>=
{
self
.
vocab_size
}
)"
f
"
{
tf
.
math
.
reduce_max
(
input_ids
)
}
>=
{
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