I’ve installed PyTorch from source (yesterday master) and Reinforcement Learning (DQN) tutorial needs couple tweaks to run Can I update it with PR or you will do this? Problems are as follows (I refer to downloaded Python source):
_, reward, done, _ = env.step(action**.cpu().numpy()**[0, 0]), accessing torch.Tensor element no longer returns value, it’s needed to convert it to numpy explicitly. Note that I don’t use CUDA, but converting it to cpu doesn’t hurt me but is needed for CUDA case.
expected_state_action_values = Variable(expected_state_action_values.data**.view(-1, 1)**), without adding this dummy dim further in code (line 417) there are problems with
And of course
tourch.no_grad() should be used, but it’s not in official release for now so I omit it.