I am using keras Flatten() layer after a dropout layer whose output shape is (?,35,50). The output of Flatten() is (?,?) whereas it should be (?, 35*50).
The code snippet is-
y2=MyLayer((35,50))(y1)
y2=BatchNormalization()(y2)
y2=Dropout(0.5)(y2)
y3=Flatten()(y2)
y4=Dense(32)(y2)
The size of output of dropout layer is-
tf.Tensor 'dropout_22/cond/Merge:0' shape=(?, 35, 50) dtype=float32
And that of flatten layer is
tf.Tensor 'flatten_7/Reshape:0' shape=(?, ?) dtype=float32
Please suggest what is wrong.