JernejHabjan / TrumpDefense2020

Visual representation of RTS game, supported by deep reinforcement learning algorithm Alpha Zero written in python.
https://jernejhabjan.github.io/TrumpDefense2020/
MIT License
6 stars 1 forks source link

Garbage collection on begin training #33

Closed JernejHabjan closed 5 years ago

JernejHabjan commented 5 years ago

garbage collect and free ram when executing threaded "onBeginTraining" in get_action - tried gc.collect, del, = None, gc.autocollect, clear_session, sess.close... try these actions in "onJsonInput"

JernejHabjan commented 5 years ago

https://github.com/getnamo/tensorflow-ue4/issues/25

https://github.com/getnamo/tensorflow-ue4/releases/tag/0.10.0

JernejHabjan commented 5 years ago

Maybe add sys.exit(0) after code completion

JernejHabjan commented 5 years ago

Fixed used following code: https://github.com/keras-team/keras/issues/2397#issuecomment-385317242