Open HaseebLUMS opened 5 years ago
@HaseebLUMS
Did you use pytorch 0.4? If so, could you use pytorch 1.1? I checked with 1.1.
My pytorch is 1.1.0 cpu-only and python is 3.6.10, the program also has this issues !
main.py-->subtoken_match(): exp_subtokens = label_vocab.itosubtokens[expected.item()] actual_subtokens = label_vocab.itosubtokens[actual.item()] is fault.
The right codes is : exp_subtokens = label_vocab.itosubtokens[expected] actual_subtokens = label_vocab.itosubtokens[actual]
File "main.py", line 344, in subtoken_match exp_subtokens = label_vocab.itosubtokens[expected.item()] AttributeError: 'int' object has no attribute 'item'