mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Co-authored-by: susnato <susnato@tensorflow123456@gmail.com>
This commit is contained in:
parent
488a179ce1
commit
a5327c6a9a
@ -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})"
|
||||
|
Loading…
Reference in New Issue
Block a user