Open jun297 opened 1 year ago
Which version of pytorch are you using? This is because the problem of in-place operation in the new version of pytorch, for example, >=1.10
I am using 1.13.1+cu117
same problem with pytorch 1.8.1+cuda11.1
same problem with torch 1.13+cuda 11.6
line 222 in label_smoothed_cross_entropy.py updated as the following: From
net_output[0].masked_fill_(~constraint_masks, -math.inf)
Tonet_output[0] = net_output[0].masked_fill(~constraint_masks, -math.inf)
(https://github.com/OFA-Sys/OFA/pull/341/commits/6a750999afff254623e7df95279776a460a20a50)
With the latest code, I got an error typeError: 'tuple' object does not support item assignment
I fixed by using the previous one. Is there any reason why it is changed?