dqn-pytorch icon indicating copy to clipboard operation
dqn-pytorch copied to clipboard

Expanded tensor size mismatch

Open thomaspinder opened this issue 6 years ago • 0 comments

I get the following error when running the DQN in train mode:

File "dqn.py", line 507, in optimize target_values[non_final_mask] = reward_batch[non_final_mask] + target_pred.max(1)[0] * gamma RuntimeError: The expanded size of the tensor (1) must match the existing size (30) at non-singleton dimension 1

I'm running PyTorch 0.4.0 and Torchvision 0.2.1. Do you know how to solve this problem?

thomaspinder avatar Aug 09 '18 08:08 thomaspinder