"tests/models/bart/test_modeling_tf_bart.py" did not exist on "cd9274d0107079cb4ba5a8d00bba2fcd8236c220"
Unverified Commit a5327c6a authored by Susnato Dhar's avatar Susnato Dhar Committed by GitHub
Browse files

Fixed issue #21053 (#21065)

Co-authored-by: susnato <susnato@tensorflow123456@gmail.com>
parent 488a179c
......@@ -446,7 +446,7 @@ class TFGPT2MainLayer(tf.keras.layers.Layer):
# indices on GPU, returning zeros instead. This is a dangerous silent behavior.
tf.debugging.assert_less(
input_ids,
tf.cast(self.vocab_size, dtype=input_ids.dtype),
tf.cast(self.config.vocab_size, dtype=input_ids.dtype),
message=(
"input_ids must be smaller than the embedding layer's input dimension (got"
f" {tf.math.reduce_max(input_ids)} >= {self.vocab_size})"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment