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:. :-)
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 judgementif 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 beif episode % 5 == 4:
orif (episode+1) % 5 == 0:
. :-)