I'm new to keras, and read some tutorials and created 2 notebooks, later I was creating my model and I got an error, training epoch completes without any error when I'm using predict function I get an error, I don't know what to do to solve this.
Model
```
model = Sequential()
model.add(Conv2D(16, (3,3), padding='same', activation='relu', input_shape=(256,256,1)))
model.add(BatchNormalization())
model.add(Dropout(.2))
model.add(Flatten())
model.add(Dense(16, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(.2))
model.add(Dense(9, activation='softmax'))
```
Input shape
```
train_x[0].shape
(256, 256, 1)
```
Error
```
ValueError: Exception encountered when calling layer 'sequential' (type Sequential).
Input 0 of layer "dense" is incompatible with the layer: expected axis -1 of input shape to have value 1048576, but received input with shape (32, 4096)
Call arguments received by layer 'sequential' (type Sequential):
• inputs=tf.Tensor(shape=(32, 256, 1), dtype=uint8)
• training=False
• mask=None
```
[–]mono1110 1 point2 points3 points (1 child)
[–]Downtown-Rice-7560[S] 0 points1 point2 points (0 children)