mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-03 03:31:05 +06:00
Fix issue: #1962, input's shape seem to cause error in 2.2.0 version tf_albert_model
This commit is contained in:
parent
45d767297a
commit
88b317739f
@ -645,7 +645,7 @@ class TFAlbertModel(TFAlbertPreTrainedModel):
|
||||
if input_ids is not None and inputs_embeds is not None:
|
||||
raise ValueError("You cannot specify both input_ids and inputs_embeds at the same time")
|
||||
elif input_ids is not None:
|
||||
input_shape = input_ids.shape
|
||||
input_shape = tf.shape(input_ids)
|
||||
elif inputs_embeds is not None:
|
||||
input_shape = inputs_embeds.shape[:-1]
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user