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 'tensorflow.keras.layers.experimental'Bug: #1904

Open
veiro opened this issue Mar 12, 2024 · 4 comments

Comments

@veiro
Copy link

veiro commented Mar 12, 2024

Bug Description

when import autokeras

import autokeras as ak

Bug Reproduction

Code for reproducing the bug:

https://colab.research.google.com/github/keras-team/autokeras/blob/master/docs/ipynb/structured_data_classification.ipynb

Setup Details

Include the details about the versions of:

  • OS type and version:
  • Python: 3
  • autokeras:
  • keras-tuner:
  • scikit-learn:
  • numpy:
  • pandas:
  • tensorflow:

Additional context

in <cell line: 4>()
2 import tensorflow as tf
3
----> 4 import autokeras as ak

7 frames
/usr/local/lib/python3.10/dist-packages/autokeras/keras_layers.py in
18 from tensorflow import nest
19 from tensorflow.keras import layers
---> 20 from tensorflow.keras.layers.experimental import preprocessing
21
22 from autokeras.utils import data_utils

ModuleNotFoundError: No module named 'tensorflow.keras.layers.experimental

@Aya121298
Copy link

I have the same problem

@sorowar-cse
Copy link

SaMEEEEEEEE

@JingxinLee
Copy link

same

@2abet
Copy link

2abet commented Apr 14, 2024

The experimental bit has been rendered redundant. Use tf.keras.layers import RandomFlip instead.
https://www.tensorflow.org/api_docs/python/tf/keras/layers/RandomFlip

If you need the full preprocessing.. you can use from tensorflow.keras.layers import *

That should work: didnt try it tho.

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

No branches or pull requests

5 participants