2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

TypeError: 'NoneType' object is not callableとエラーが発生した場合

Last updated at Posted at 2018-04-25

Kerasの学習後に以下のエラーが発生しました。

Exception ignored in: <bound method BaseSession.__del__ of <tensorflow.python.client.session.Session object at 0x7fa1662e5d30>>
Traceback (most recent call last):
  File "/home/Users/.virtualenvs/Pythonの環境名/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 712, in __del__
  File "/home/Users/.virtualenvs/Pythonの環境名/lib/python3.5/site-packages/tensorflow/python/framework/c_api_util.py", line 31, in __init__
TypeError: 'NoneType' object is not callable

学習させるスクリプトにバックエンドの追加と

from keras.backend import tensorflow_backend as backend

処理の終了時に以下を呼び出して対応しましたー

backend.clear_session()
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?