I followed the tutorial correctly so I don't know what i did wrong. This is my code:
model = Sequential([
Conv2D(32, (3,3), padding='same', activation='relu', input_shape=(28,28,1)),
MaxPooling2D((2,2)),
Conv2D(64,(3,3), activation='relu'),
MaxPooling2D((2,2)),
Flatten(),
Dense(128, activation='relu'),
Dense(10)
])
#Compile the model
model.compile(optimizer='adam', loss=tf.keras.losses.SparseCategoricalCrossentropy(), metrics=['accuracy'])
#Train the model
history = model.fit(train_images, train_labels, epochs=10, validation_data=(test_images, test_labels))
ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=4, found ndim=3. Full shape received: [32, 28, 28]