@ptrblck I confirm that upgrading to PyTorch 1.0 solves this issue. Thank you very much for your help!
Surprisingly I didn’t have to change anything in my code (0.4.1), it just works!
@chrisliu54 Upgrade to PyTorch 1.0!