5.2-using-convnets-with-small-datasets
ImportError: Could not import PIL.Image. The use of array_to_img requires PIL.
Assume the train_dir path is not correct. How can i fix it?
I fixed it by install pillow lib, Thanks all. pip install pillow
@mwddevcenter please close
I fixed it by install pillow lib, Thanks all. pip install pillow
I don't think it is the problem of his. I have the pillow pakege but still have this problem. I don't remember what I did for this problem. But now I don't have this error and came out to another error. Now sure if the new error was affected by this error.
Suggestion: instead of using from keras.preprocessing import image, use:
import tensorflow as tf
load_img = tf.keras.utils.load_img
img_to_array = tf.keras.utils.img_to_array
array_to_img = tf.keras.utils.array_to_img
YES!!! I have received your E-mail——Steven Lee