I'm first time building a CNN model for image classification and i'm a little bit confused about what would be the input shape for each type (1D CNN, 2D CNN, 3D CNN) and how to fix the number of filters in the convolution layer. My data is 100x100x30 where 30 are features. Here is my essay for the 1D CNN using the Functional API Keras: def create_CNN1D_model(pool_type='max',conv_activation='relu'): input_layer = (30,1) conv_layer1 = Conv1D(filters=16, kernel_size=3, activation=conv_activation)(input_layer) max_pooling_layer1 = MaxPooling1D(pool_size=2)(conv_layer1) conv_layer2 = Conv1D(filters=32, kernel_size=3, activation=conv_activation)(max_pooling_layer1) max_pooling_layer2 = MaxPooling1D(pool_size=2)(conv_layer2) flatten_layer = Flatten()(max_pooling_layer2) dense_layer = Dense(units=64, activation='relu')(flatten_layer) output_layer = Dense(units=10, activation='softmax')(dense_layer) CNN_model = Model(inputs=input_layer, outputs=output_layer) return CNN_model CNN1D = create_CNN1D_model() CNN1D.compile(loss = 'categorical_crossentropy', optimizer = "adam",metrics = ['accuracy']) Trace = CNN1D.fit(X, y, epochs=50, batch_size=100) However, while trying the 2D CNN model by just changing Conv1D, Maxpooling1D to Conv2D and Maxpooling2D, i got the following error : ValueError: Input 0 of layer conv2d_1 is incompatible with the layer: : expected min_ndim=4, found ndim=3. Full shape received: (None, 30, 1) Can anyone please tell me how would be the input shape for 2D CNN and 3D CNN ? And what can be done on input data preprocessing? Continue reading...