Skip to content
Advertisement

ImportError: cannot import name ‘keras_tensor’ from ‘tensorflow.python.keras.engine’

I’m getting this error while loading the tensorflow addons library

import tensorflow_addons as tfa

ImportError: cannot import name 'keras_tensor' from 'tensorflow.python.keras.engine'

Advertisement

Answer

This error is because you have incompatibility issues between your TensorFlow, Python and tensorflow-addons. Uninstall the tensorflow-addons and install the version based on the table below. Refer the Github repo for more information.

compatibility

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement