Abdurrahman Azami
Abdurrahman Azami

Reputation: 1

too many values to unpack (expected 2) in XLNet model


ValueError Traceback (most recent call last) Cell In[5], line 2 1 # Get the model predictions ----> 2 start_logits, end_logits = model(**inputs)

ValueError: too many values to unpack (expected 2)

How to solve this issue?

Upvotes: 0

Views: 31

Answers (1)

nemo
nemo

Reputation: 409

I would say that your model function returns only one value (or a tuple with only one element), whereas you expect a tuple with two elements (namely: (start_logits, end_logits)). You have to check what the output of 'model' is and be sure that it returns a tuple with two elements.

Upvotes: 0

Related Questions