Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'keras.src.engine' #2865

Open
Blessing988 opened this issue Mar 29, 2024 · 1 comment
Open

ModuleNotFoundError: No module named 'keras.src.engine' #2865

Blessing988 opened this issue Mar 29, 2024 · 1 comment

Comments

@Blessing988
Copy link

I'm getting below error:

Traceback (most recent call last):
  File "/mmfs1/home/blessing.agyeikyem/Smart-Grid-Monitoring/stargan_v2_tensorflow/main.py", line 11, in <module>
    from StarGAN_v2 import StarGAN_v2
  File "/mmfs1/home/blessing.agyeikyem/Smart-Grid-Monitoring/stargan_v2_tensorflow/StarGAN_v2.py", line 18, in <module>
    from networks import *
  File "/mmfs1/home/blessing.agyeikyem/Smart-Grid-Monitoring/stargan_v2_tensorflow/networks.py", line 11, in <module>
    from ops import *
  File "/mmfs1/home/blessing.agyeikyem/Smart-Grid-Monitoring/stargan_v2_tensorflow/ops.py", line 12, in <module>
    import tensorflow_addons as tfa
  File "/mmfs1/home/blessing.agyeikyem/.local/lib/python3.9/site-packages/tensorflow_addons/__init__.py", line 23, in <module>
    from tensorflow_addons import activations
  File "/mmfs1/home/blessing.agyeikyem/.local/lib/python3.9/site-packages/tensorflow_addons/activations/__init__.py", line 17, in <module>
    from tensorflow_addons.activations.gelu import gelu
  File "/mmfs1/home/blessing.agyeikyem/.local/lib/python3.9/site-packages/tensorflow_addons/activations/gelu.py", line 19, in <module>
    from tensorflow_addons.utils.types import TensorLike
  File "/mmfs1/home/blessing.agyeikyem/.local/lib/python3.9/site-packages/tensorflow_addons/utils/types.py", line 29, in <module>
    from keras.src.engine import keras_tensor
ModuleNotFoundError: No module named 'keras.src.engine'

Tensorflow version = 2.1.0

Tensorflow-addons version = 0.9.1

Keras version = 2.3.1

Ubuntu version = 8.5

@fthielke
Copy link

fthielke commented Apr 5, 2024

This seems to be fixed in #2858, but there has not been a release with those changes.

Try installing tfa-nightly instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants