Usage of k.clear_session() and tf.reset_default_graph() to clear graph between subsequent models

1,032 views
Skip to first unread message

MasayoMusic

unread,
Feb 1, 2019, 5:16:24 AM2/1/19
to Keras-users

I can"t seem to clear the graph properly when loading multiple models subsequently.

k.clear_session()   
tf.reset_default_graph()

is just closing the program in Python after the first model is loaded. If remove the above lines, I am able to load subsequent models, but then I run into the memory leak.


I made a post on stackoverflow, but recently my keras questions are going unanswered on keras and I dont know where else to ask  :(


Here is a link to the problem as well as the code:


https://stackoverflow.com/questions/54477157/usage-of-k-clear-session-and-tf-reset-default-graph-to-clear-graph-between-s

Reply all
Reply to author
Forward
0 new messages