1. 程式人生 > >tensorflow程式碼執行的最後丟擲異常:TypeError: 'NoneType' object is not callable

tensorflow程式碼執行的最後丟擲異常:TypeError: 'NoneType' object is not callable

tensorflow程式碼執行的最後丟擲異常:
問題:Exception ignored in: <bound method BaseSession.__del__ of <tensorflow.python.client.session.Session object at 0x7f15b0500400>>
Traceback (most recent call last):
  File "/home/raini/app/anoconda3/envs/py35/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 696, in __del__
TypeError: 'NoneType' object is not callable
匯入下面兩條程式碼就行:
from keras import backend as K
K.clear_session()