"...test/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "cbb63c5bec618354a25583c0861f45d4a01d9812"
Commit 88b31773 authored by root's avatar root Committed by Lysandre Debut
Browse files

Fix issue: #1962, input's shape seem to cause error in 2.2.0 version tf_albert_model

parent 45d76729
......@@ -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:
......
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