Open planemanner opened 2 years ago
This issue is for pytorch 1.7+ version user
Line 148, 160 in main.py script
Line 148
100. * batch_idx / len(train_loader), loss.data[0]))
Line 160
test_loss += F.cross_entropy(output, target, size_average=False).data[0]
The end of those code lines should be revised as following .data[0] -> .item()
I know most of guys using this repo can fix easily, but someone would be confused. So I leave above minor tip in this issue.
This issue is for pytorch 1.7+ version user
Line 148, 160 in main.py script
Line 148
Line 160
The end of those code lines should be revised as following .data[0] -> .item()
I know most of guys using this repo can fix easily, but someone would be confused. So I leave above minor tip in this issue.