解决tensorflow的Session Exception问题

Exception ignored in: <bound method BaseSession.__del__ of <tensorflow.python.client.session.Session object at 0x7fd3edd13e10>>

Traceback (most recent call last):
File "venv/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 712, in __del__
TypeError: 'NoneType' object is not callable

 

解决方法:

from keras import backend as K
K.clear_session()

 

参考:

https://stackoverflow.com/questions/40560795/tensorflow-attributeerror-nonetype-object-has-no-attribute-tf-deletestatus

posted @ 2018-04-21 11:39  焦距  阅读(5425)  评论(0编辑  收藏  举报