-
Notifications
You must be signed in to change notification settings - Fork 11
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
Memory Leak in DDQN #22
Comments
I have found that the huber_loss with GradientDescentOptimizer cause the memory leak, and when I changed to reduce mean with RMSPropOptimizer it disappears. Can you explain why you use the huber loss with gradient descent optimizer? Thank you so much.
|
Thanks for your observation--I wasn't aware that the "leak" was associated with the Huber loss function and sadly don't know why this should be, but will make a note to check it out once things here subside to a dull roar, so to speak. Until we can evaluate the impact of a change of loss function production code at the moment is avoiding batch inputs with model.fit(), instead fitting in a loop and saving/clearing/reloading the model periodically, which stopgap manages to prevent memory (64 GBytes) being completely consumed before convergence obtains. If it's of any interest the restart algo is triggered by the following command placed at a convenient spot in the model.fit() loop:
where "agent" is a class instance containing the model and its methods, as follows:
|
Thank you so much that you program the Double DQN algorithm. However when I run this algorithm I faced a memory increase consistantly when trainning. Do you have any idea where the memory leak could happen?
https://github.com/ChuaCheowHuan/reinforcement_learning/blob/master/DQN_variants/DDQN/double_dqn_cartpole.py#L339
The text was updated successfully, but these errors were encountered: