nshaud / DeepNetsForEO

Deep networks for Earth Observation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyTorch 4.0 compliance

nshaud opened this issue · comments

Since PyTorch 4.0, some things have been deprecated and should be fixed:

  • Variable does not exist anymore
  • loss.data[0] should now be loss.item()
  • volatile flag does not do anything, use no_grad instead
  • .to() method allows us to write device-agnostic code