[bytstander comemnt] Thats pretty weird. Whats ht output of print(input), just before the out = net(input) line?
what happens if you insert a new line, just before current line 40, in /home/ssudholt/checkouts/pytorch-tests/env/local/lib/python2.7/site-packages/torch/nn/functional.py, that says print(input), and rerun?