PyTorch 4.0 compliance
nshaud opened this issue · comments
Nicolas Audebert commented
Since PyTorch 4.0, some things have been deprecated and should be fixed:
-
Variable
does not exist anymore -
loss.data[0]
should now beloss.item()
-
volatile
flag does not do anything, useno_grad
instead -
.to()
method allows us to write device-agnostic code