RuntimeError: stack expects each tensor to be equal size, but got [12] at entry 0 and [35] at entry 1
I am following the tutoiral of text classification in the website but get this error while apply it into my own dataset that is similar to the tutorial one ! I checked if i have empty values or empty tensor but get this error of tensor of 0 elements into shape[-1,0] and i can’t figure it out any help?This my notebook linkarabic_tweets_classification | Kaggle
2023-07-11T07:02:30Z
I think the tokenized texts are not of the same length as indicated by this warning message.image938×341 27.9 KBIf you adjust the input length to be the same at each batch, I think the error will go away.
2023-09-03T04:39:09Z
I had the same problem, and it went away after settingmax_lengthparameter ontokenizer.