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

Unmatching size and error

Open tegg89 opened this issue 8 years ago • 3 comments

Hi, thanks for sharing your wonderful code. But I have met some errors when running it.

  1. Inside the line 197~205 from dqn_learn.py, the size of target_Q_values and that of current_Q_values does not matched well. I have changed to next_max_q = next_max_q.unsqueeze(-1) for correcting sizes. Also I have changed to rew_batch[0] from line 203.

  2. (IMO) After stacking records in replay buffer, queue action does not work properly. I have changed the line 158 to action = select_epilson_greedy_action(Q, recent_observations, t), however different action value has queued.

I am still working these but having troubles. Could you help make them right?

tegg89 avatar Aug 21 '17 08:08 tegg89

Thanks for your question. But I won't be available for a few days. I will revisit it when I have time. Which pytorch version do you use? I haven't updated to latest version. It might be the problem.

hungtuchen avatar Aug 22 '17 13:08 hungtuchen

@transedward Thanks for your reply. I have tested in Pytorch 0.2.0.post1 (0.2.0.1), Python 3.5.3 with Anaconda and Ubuntu 16.04.

tegg89 avatar Aug 28 '17 05:08 tegg89

@tegg89 : Checkout #8 . Let us know if it worked/didn't work.

praveen-palanisamy avatar Nov 01 '17 02:11 praveen-palanisamy