I’m getting two different behaviors of autograd.Variable
and I’m wondering if it’s because of the pytorch version.
On my local machine (OS X, pytorch version 0.4.0), I get
In [6]: type(autograd.Variable(torch.from_numpy(np.array([10,2]))))
Out[6]: torch.Tensor
On the server I’m using (pytorch version 0.3.0.post4), I get
In [6]: type(autograd.Variable(torch.from_numpy(np.array([10,2]))))
Out[6]: torch.autograd.variable.Variable
This different behavior affects my code downstream because those two instance types have different methods (e.g., topk()
vs. argmax()
).
Any ideas?