'ValueError: ('Input data in `NumpyArrayIterator` should have rank 4. You passed an array with shape', (35424, 0))

I'm trying to train the dataset using keras and tensorflow, the code runs fine till the model summary, after that I'm getting a value error. Here is my code for training the parameters:

opt = Adam(lr=INIT_LR, decay=INIT_LR / EPOCHS)
model.compile(loss="binary_crossentropy", optimizer=opt,metrics=["accuracy"])
print("[INFO] training network...")

history = model.fit_generator(
    aug.flow(x_train, y_train, batch_size=BS),
    validation_data=(x_test, y_test),
    steps_per_epoch=len(x_train) // BS,
    epochs=EPOCHS, verbose=1
)

included my error message screenshot here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source