How to evaluate model while the data splitted manually in deep learning?
I split my dataset separated with my model file.
So in my model file, I just run the model and set which is train, val, and test.
My model already has good results, but I struggled when I want to evaluate and predict the model.
Here’s my code to set which is train, val, and test file.
train_datagen = ImageDataGenerator( rotation_range=45, width_shift_range=0.2, height_shift_range=0.2, shear_range=0.2, zoom_range=0.2, horizontal_flip=True, fill_mode="nearest")
when I run this code
score = model.evaluate(train_generator, test_generator, verbose=1)
this error appeared
ValueError: `y` argument is not supported when using `keras.utils.Sequence` as input.
I do not think you should be passing both your
test_generator when evaluating your model. Maybe try this:
score = model.evaluate(test_generator, verbose=1)
Unlike the the method
model.fit that can take a training and a validation set,
model.evaluate only accepts one set of inputs.
Answered By – AloneTogether