Lakpa Tamang
Lakpa Tamang

Reputation: 438

ImportError: cannot import name 'image_dataset_from_directory' from 'tensorflow.keras.preprocessing' (unknown location)

Why am i getting this issue? I can import image module from kera.preprocessing. But cannot import image_dataset_from_directory. TF version: 1.14

Upvotes: 5

Views: 14047

Answers (2)

Mina Abd El-Massih
Mina Abd El-Massih

Reputation: 656

You can fix it by updating TensorFlow using pip install --upgrade tensorflow

Upvotes: 8

Muhammad Haseeb Khan
Muhammad Haseeb Khan

Reputation: 965

At the time of answering(the latest TensorFlow version is 2.4.1) and if you simply upgrade your tensorflow then issue will be resolved, also no need to install tf-nightly

pip install --upgrade tensorflow

Upvotes: 1

Related Questions