PacktPublishing / Deep-Reinforcement-Learning-Hands-On

Hands-on Deep Reinforcement Learning, published by Packt
MIT License
2.83k stars 1.28k forks source link

Normalise Gym video frames between [-1, 1] #15

Closed gowtham1997 closed 5 years ago

gowtham1997 commented 5 years ago

Since the generator outputs values between (-1, 1)( because of tanh), I think its also better than the Game video frames are normalized between [-1, 1] instead of [0, 1] (since you divide them by 255.0). The Generator loss is much more stable(Light blue in the picture below) after this and after 40-50K, the results are much better. Additionally, changing ReLU to LeakyReLU gave better results but I haven't changed that to avoid confusion of people reading the book and watching the code. gen_loss

gowtham1997 commented 5 years ago

@Shmuma can you please take a look?

Shmuma commented 5 years ago

Hi!

Thanks and sorry for a long wait!