--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-9-723113058bd1> in <module>() 2 datagen = ImageDataGenerator(rescale = 1./255., validation_split = 0.20) 3 ----> 4 train_generator = datagen.flow_from_dataframe(dataframe = train_df, 5 directory = "../input/train/", 6 x_col = "Id", AttributeError: 'ImageDataGenerator' object has no attribute 'flow_from_dataframe'
Keras 2.2.4 has this, released a few days ago.
>>> import keras
Using TensorFlow backend.
>>> keras.__version__
'2.2.4'
>>> gen = keras.preprocessing.image.ImageDataGenerator()
>>> gen.flow_from_dataframe
<bound method ImageDataGenerator.flow_from_dataframe of <keras.preprocessing.image.ImageDataGenerator object at 0x7faf7c8aa198>>
Make sure that you have keras 2.2.4 installed and you are actually using it (and not an older version).