Not Able To Accurately Input A Batch Of Images Into A Model.fit
My model is designed to train dual images. Since the dataset is very huge I used tf.data.Dataset method to get them as batches as suggested here. However I had a difficulty at prop
Solution 1:
hist = base_model.fit((tr_examples[0][0], tr_examples[0][1]), epochs=epochs, verbose=1,
validation_data=(val_examples[0][0], val_examples[0][1]), shuffle=True)
should be:
hist = base_model.fit(tr_examples[0][0], tr_examples[0][1], epochs=epochs, verbose=1,
validation_data=(val_examples[0][0], val_examples[0][1]), shuffle=True)
Note that while the validation_data
parameter expects a tuple, the training input/label pair should not be a tuple (i.e., remove the parenthesis).
Post a Comment for "Not Able To Accurately Input A Batch Of Images Into A Model.fit"