question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name 'preprocessing' from 'tensorflow.keras.layers.experimental'

See original GitHub issue

I tried to run Auotokeras and was hit with the error message upon import autokeras:

ImportError: cannot import name 'preprocessing' from 'tensorflow.keras.layers.experimental'

I think this is due to some version mismatch, - so I suggest that the documentation should include the needed tensorlfow / keras versions.

I am currently on:

Keras: 2.2.4 Tensorflow: 1.15.0 OS: Windows 10

Thank you for your help

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
haifeng-jincommented, Feb 5, 2020

@jcrodriguez1989 Yeah, I will add it to the documentation later today. Thx

@kevinkit We are actually using the tf.keras (Keras inside TensorFlow package) instead of the standalone Keras. So you don’t need to worry about the installation of Keras as long as you installed the correct version of TensorFlow. Thx

2reactions
jcrodriguez1989commented, Feb 5, 2020

Hi @kevinkit , the minimum tensorflow requirement is 2.1.0 . It would be great if this requirement could be documented.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot import name 'preprocessing' from 'tensorflow.keras ...
When I run the code above. I get ImportError: cannot import name 'preprocessing' from 'tensorflow.keras.experimental". And before you what ...
Read more >
import tensorflow.keras.preprocessing.image could not be ...
The reason here is that tensorflow tries to load the keras module in a lazy fashion, which means that it holds only a...
Read more >
How to avoid KERAS import errors in your notebooks - Kaggle
Recently I had an issue while importing KERAS libraries with issues such as. ImportError: cannot import name 'is_tf_type' from ...
Read more >
TensorFlow使用keras报错ImportError: cannot import name ...
解决办法. # 改为 from tensorflow.keras.preprocessing.sequence import pad_sequences.
Read more >
How to Fix : “ImportError: Cannot import name X” in Python?
You can solve the “ ImportError : Cannot import name X” Error by resolving the circular dependencies. You can do that either by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found