simoninithomas / Deep_reinforcement_learning_Course

Implementations from the free course Deep Reinforcement Learning with Tensorflow and PyTorch
http://www.simoninithomas.com/deep-rl-course
3.74k stars 1.23k forks source link

Something about saving models #58

Open MeredithChai opened 5 years ago

MeredithChai commented 5 years ago

Hi,

Im just training DQN and notice that most of training loops will use the range() function to iterate, and save in every 5 episode via a judgement if episode % 5 == 0: .

I guess you want to save the model after each 5 loops, but you know, range() will start at 0. So I suppose the judgement here should be if episode % 5 == 4: or if (episode+1) % 5 == 0:. :-)