I have created the following neural networks:
model = keras.Sequential()
model.add(layers.Conv2D(3, (3,3), activation="relu", padding="same", input_shape=constants.GRID_SHAPE))
model.add(layers.MaxPooling2D((3,3)))
model.add(layers.Flatten())
model.add(layers.Dense(constants.NUM_ACTIONS), activation="softmax")
where constants.GRID_SHAPE is (4,12).
I get the following error:
ValueError: Input 0 of layer "conv2d" is incompatible with the layer: expected min_ndim=4, found ndim=3. Full shape received: (None, 4, 12)
How can I fix this problem?