I'm running pytorch 0.2,
and the code dqn_learn.py
fail to work..
the error as follow
Traceback (most recent call last):
File "ram.py", line 57, in <module>
main(env)
File "ram.py", line 46, in main
target_update_freq=TARGER_UPDATE_FREQ,
File "/auto/master05/ssarcandy/ttt/dqn_learn.py", line 213, in dqn_learing
current_Q_values.backward(d_error.data.unsqueeze(1))
File "/home/master/05/ssarcandy/.local/lib/python2.7/site-packages/torch/autograd/variable.py", line 156, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)
File "/home/master/05/ssarcandy/.local/lib/python2.7/site-packages/torch/autograd/__init__.py", line 98, in backward
variables, grad_variables, retain_graph)
File "/home/master/05/ssarcandy/.local/lib/python2.7/site-packages/torch/autograd/function.py", line 91, in apply
return self._forward_cls.backward(self, *args)
File "/home/master/05/ssarcandy/.local/lib/python2.7/site-packages/torch/autograd/_functions/tensor.py", line 566, in backward
return grad_input.scatter_add_(ctx.dim, index, grad_output), None, None
File "/home/master/05/ssarcandy/.local/lib/python2.7/site-packages/torch/autograd/variable.py", line 696, in scatter_add_
return ScatterAdd.apply(self, dim, index, source, True)
File "/home/master/05/ssarcandy/.local/lib/python2.7/site-packages/torch/autograd/_functions/tensor.py", line 605, in forward
return input.scatter_add_(ctx.dim, index, source)
RuntimeError: invalid argument 3: Index tensor must have same dimensions as input tensor at /pytorch/torch/lib/THC/generic/THCTensorScatterGather.cu:198