Since PyTorch 4.0, [some things have been deprecated and should be fixed](https://pytorch.org/2018/04/22/0_4_0-migration-guide.html): - [ ] `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
Since PyTorch 4.0, some things have been deprecated and should be fixed:
Variabledoes not exist anymoreloss.data[0]should now beloss.item()volatileflag does not do anything, useno_gradinstead.to()method allows us to write device-agnostic code