0

the code gives me this value error can anyone help!

from keras.callbacks import ModelCheckpoint, EarlyStopping
#import tensorflow.keras as keras

checkpoint = ModelCheckpoint("vgg16_1.h5", monitor='val_acc', verbose=1, save_best_only=True, save_weights_only=False, mode='auto', period=1)
early = EarlyStopping(monitor='val_acc', min_delta=0, patience=20, verbose=1, mode='auto')

hist = model.fit_generator(steps_per_epoch=100,generator=traindata, validation_data= testdata, validation_steps=10,epochs=100,callbacks=[checkpoint,early])`

Error :

ValueError: Failed to find data adapter that can handle input: <class 'keras.preprocessing.image.ImageDataGenerator'>, <class 'NoneType'>
  • Include your input data since the error sea to be related to it – Rodrigo Laguna Jul 20 '22 at 23:45
  • Hi @HusseinAliOfficial, please add Minimal Reproducible Code in the question so that we can replicate and assist you better. Thank you! –  Jul 27 '22 at 06:54
  • In the absence of a dataset, the error may not be able to be replicated. However, this is a valid error when we enter in a data which doesn't happen to be a numpy array . You can also try using tf.keras instead of keras. Please refer to this [issue](https://stackoverflow.com/questions/57874436/tensorflow-data-adapter-error-valueerror-failed-to-find-data-adapter-that-can) for your reference. – TF_Chinmay Jul 28 '23 at 05:51

0 Answers0