Exception ignored in: <bound method BaseSession.__del__ of <tensorflow.python.client.session.Session object at 0x000000001AB286D8>> Traceback (most recent call last): File "python3.5.2\lib\site-packages\tensorflow\python\client\session.py", line xxx, in __del__ TypeError: 'NoneType' object is not callable
Reason: When the Python garbage collection mechanism collects the Session object, it finds that c_api_util or Tf_session has been collected, resulting in a null pointer. The following comment is the reason given when an exception is thrown in the source code of TensorFlow
# At shutdown, `c_api_util` or `tf_session` may have been garbage # collected, causing the above method calls to fail. In this case, # silently leak since the program is about to terminate anyway.
import keras.backend as K # your code K.clear_session()
import gc # your code gc.collect()
- failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
- Building wheel for wrapt (setup.py) … error
- Tensorflow with tf.Session The usage of () as sess
- tensorflow.python.framework.errors_impl.InternalError: Failed to create session.
- On the problem that VTK + QT process can’t end after closing the program
- How to Solve failed Precondition Error: attempting to use uninitialized value beta1_power
- Tensorflow training could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR error
- Attributeerror: module tensorflow no attribute app solution
- Tensorflow error: module ‘tensorflow’ has no attribute ‘xxx’
- numpy.core.umath How to solve the problem of failed to import
- Importerror using tensorflow: DLL load failed: the specified program cannot be found
- Problem solving module ‘ tensorflow.compat . V2 ‘has no attribute’ contrib ‘and importerror cannot import name’ auto ‘
- Failed to load the native TensorFlow runtime.
- Tensorflow import error: DLL load failed: the specified module could not be found
- tensorflow import error: DLL load failed: The specified module could not be found (DLL load failed: The specified module could not be found)
- Solution: Failed to load the native TensorFlow runtime.
- Windows10解决ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed
- InternalError: Failed to create session. Error and solution
- Anaconda builds a new environment and installs sklearn, numpy and other modules
- Memory error in Python numpy matrix