mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Input Embeddings should be assigned
cc @julien-c
This commit is contained in:
parent
bac51fba3a
commit
f09f42d4d3
@ -756,7 +756,7 @@ class XLNetModel(XLNetPreTrainedModel):
|
||||
input_ids = input_ids.transpose(0, 1).contiguous()
|
||||
qlen, bsz = input_ids.shape[0], input_ids.shape[1]
|
||||
elif inputs_embeds is not None:
|
||||
inputs_embeds.transpose(0, 1).contiguous()
|
||||
inputs_embeds = inputs_embeds.transpose(0, 1).contiguous()
|
||||
qlen, bsz = inputs_embeds.shape[0], inputs_embeds.shape[1]
|
||||
else:
|
||||
raise ValueError("You have to specify either input_ids or inputs_embeds")
|
||||
|
Loading…
Reference in New Issue
Block a user