Conv2d Layer Output Shape In Keras
I want to manually give input to keras Conv2D layer. I take MNIST data set. Conv2D accepts only tensors, so I change x_train to x_train_tensor using the Input command of keras.
Solution 1:
The number of samples is not part of the input_shape
, in your case you are making two mistakes. First is having the wrong input shape, and second is specifying two input shapes, once in the Input constructor, and second in the Conv2D instance:
x_train_tensor=Input(shape=(28, 28, 1), name='x_train')
A=Conv2D(32, kernel_size=(3, 3), activation='relu')(x_train_tensor)
Post a Comment for "Conv2d Layer Output Shape In Keras"