hardmaru / WorldModelsExperiments

World Models Experiments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory leak and potential fix

davidsandberg opened this issue · comments

Hi @hardmaru!
Thanks for a great repo and a really cool project!!
I was running the 'carracing' experiment but experienced memory problems. This was caused by new tensorflow assign operations being created every time set_model_params (in rnn.py and vae.py) is called.
I implemented a fix where the assign operations were created when the graph was built and used when setting the parameters.
If you are interested in a fix I can make a PR, or you simply just copy and paste the fix from here (look at the diffs in rnn.py and vae.py).