Yeah strange, this is quite literally the version I installed:
pip3 install http://download.pytorch.org/whl/cu92/torch-0.4.1-cp36-cp36m-win_amd64.whl
Note that I did not ever install nightly, because it tells me package cannot be found. Gathering from the information so far, I can only guess that this is either the difference in the nightly version, or that I’m potentially using a newer version than you where they have stopped accepting integers in the tensor() method.
Is it worth applying my suggested code change anyway such that it caters for all versions of pytorch?
I also noticed that a separate post also made mention of a potentially similar situation, but the user fixed it in a different way. See Fastai V1 and multilabel (Ulmfit)