There apears to be an error in this tutorial… makes it really hard for beginners to learn!!
http://pytorch.org/tutorials/beginner/blitz/autograd_tutorial.html 12
Following intro tutorial and running
x = Variable(torch.ones(2, requires_grad=True))
print(x)
Gives:
TypeError                                 Traceback (most recent call last)
 in ()
----> 1 x = Variable(torch.ones(2, requires_grad=True))
2 print(x)
TypeError: torch.ones received an invalid combination of arguments - got (int, requires_grad=bool), but expected one of:

(int … size)
didn’t match because some of the keywords were incorrect: requires_grad
(torch.Size size)

What is going on?. I followed the example exactly.