Update elf to support pytorch 0.4
This PR updates the code base to be somewhat compatible with the new version of Pytorch. Note that the new Pytorch version includes fixes in important things like the multinomial distribution (which is used in ELF). Hence it can lead to a different behaviour.
A summary of the changes:
- Use .item() where appropriate. I may have missed some places, since I only tested this PR on Atari
- Remove volatile and use torch.no_grad instead
- Some stricter reshaping to cope with finickier dimension checks
Unfortunately, merging this PR means that ELF no longer works on 0.3 and earlier.
Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.
Before we can review or merge your code, we need you to email [email protected] with your details so we can update your status.
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!