SciSharp / SciSharp-Stack-Examples

Practical examples written in SciSharp's machine learning libraries
http://scisharpstack.org
Apache License 2.0
313 stars 100 forks source link

module 'tensorflow.keras.preprocessing' has no attribute 'image_dataset_from_directory' #23

Open github4mathews opened 3 years ago

github4mathews commented 3 years ago

module 'tensorflow.keras.preprocessing' has no attribute 'image_dataset_from_directory'

train_ds = tf.keras.preprocessing.image_dataset_from_directory( data_dir, validation_split=0.2, subset="training", seed=123, image_size=(img_height, img_width), batch_size=batch_size)

in image_classification.py

Oceania2018 commented 3 years ago

There it is but with bug for this moment.

image

pardont commented 3 years ago

@Oceania2018 is the bug fixed? NullReferenceException thrown when executing the code . https://github.com/SciSharp/SciSharp-Stack-Examples/issues/27

Oceania2018 commented 3 years ago

@pardont Not yet.

lqdev commented 3 years ago

@Oceania2018 is there a recommended workaround for this in the meantime?

Oceania2018 commented 3 years ago

@lqdev Same issue as https://github.com/SciSharp/TensorFlow.NET/issues/666, fixed the image_dataset_from_directory, but still has other bug for the rest part of that example.