-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapter 06 DQN pong training #77
Comments
There is no such big action, the correct action range is from 0 to env.action_space.n (which is 5 on Pong, totally 6 actions). So, I think you can check the array action_v. make sure that was the really action array you want to input to the method gather. |
Hi, guys, This error also appears when I use the CPU instead of the GPU. Traceback (most recent call last): If I use '.long()' the speed decreases massively. But the code runs. And: |
Hi,
so I faced this error while running the code for training the DQN agent on pong
8589: done 9 games, mean reward -20.444, eps 0.91, speed 124.21 f/s
9518: done 10 games, mean reward -20.400, eps 0.90, speed 121.48 f/s
Traceback (most recent call last):
File "02_dqn_pong.py", line 169, in
loss_t = calc_loss(batch, net, tgt_net, device=device)
File "02_dqn_pong.py", line 96, in calc_loss
state_action_values = net(states_v).gather(1, actions_v.unsqueeze(-1)).squeeze(-1)
RuntimeError: index 17179869185 is out of bounds for dimension 1 with size 6
I want to know the reason for this indexing error, it happens when I start training the network and I don't have any idea on it's cause
The text was updated successfully, but these errors were encountered: