So I am new to Keras and Tensorflow. I'm trying to import the img_to_array function and for some reason it is not importing it. I read the documentation it says from PIL import Image and after that use tf.keras.preprocessing.image.img_to_array(img) and that doesn't work either. I am using anaconda.
Here's the code:
from keras.preprocessing.image import img_to_array
And here's the error:
AttributeError: module 'tensorflow' has no attribute 'name_scope'