How to fix "ModuleNotFoundError: No module named 'keras.layers.advanced_activations' "

Viewed 4375

I'm trying to import imageai

from imageai.Detection import VideoObjectDetection

but get error message below

ModuleNotFoundError: No module named 'keras.layers.advanced_activations'

My tensorflow version 2.9.1, keras version 2.9.0, keras-preprocessing version 1.1.2, image ai version 2.1.5,

I installed the imageai via pip install imageai-2.0.2-py3-none-any.whl and download from here.

2 Answers

I encountered the same error today. Downgrading my keras to 2.1.0 and tensorflow to 2.2.0 got rid of the error.

I faced the same error. ModuleNotFoundError: No module named 'keras.layers.advanced_activations' To solve this problem:

Try to install TensorFlow 2.8.2 which is compatible with Keras 2.8.0 pip install tensorflow==2.8.2

Related