I define the model definition as follows.
tf.keras.datasets.mnist
model = keras.models.Sequential([
tf.keras.layers.Conv2D(28, (3,3), activation='relu', input_shape=(28, 28, 1)),
tf.keras.layers.MaxPooling2D((2, 2)),
tf.keras.layers.Conv2D(56, (3,3), activation='relu'),
tf.keras.layers.Flatten(),
tf.keras.layers.Dense(64, activation='relu'),
tf.keras.layers.Dense(10, activation='softmax'),
])
model.fit(x_train, y_train, epochs=3) <----error
When I try to run with my data set, it gives the following error.
ValueError: Input 0 of layer sequential_3 is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: [32, 28, 28]