zuoxingdong / VIN_PyTorch_Visdom

PyTorch implementation of Value Iteration Networks (VIN): Clean, Simple and Modular. Visualization in Visdom.
226 stars 39 forks source link

Error when running example script #5

Open bjkomer opened 6 years ago

bjkomer commented 6 years ago

When I run one of the example scripts listed

python run.py --datafile data/gridworld_8x8.npz --imsize 8 --lr 0.005 --epochs 30 --k 10 --batch_size 128

I get the following error:

Traceback (most recent call last):
  File "run.py", line 109, in <module>
    outputs = net(X, S1, S2, args)
  File "/home/user/anaconda3/envs/py3torch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/user/VIN_PyTorch_Visdom/VIN.py", line 84, in forward
    rv = torch.cat([r, v], 1) # [batch_size, 2, imsize, imsize]
RuntimeError: invalid argument 0: Tensors must have same number of dimensions: got 3 and 4 at /opt/conda/conda-bld/pytorch_1525812548180/work/aten/src/THC/generic/THCTensorMath.cu:102

Any idea what could be causing this? I'm using Python 3.6 with Anaconda, and torch version 0.4.0