I Have a conv2d layer in keras with the input shape from input_1 (InputLayer) [(None, 100, 40, 1)]
   input_lmd = Input(shape=(T, NF, 1))

    # build the convolutional block
    conv_first1 = Conv2D(32, (1, 2), strides=(1, 2))(input_lmd)

I’m trying to do the equivalent in Pytorch with something like
 self.conv1 = nn.Conv2d(100, 32, (1, 2), stride=(1, 2))

But i’m getting the error
*** RuntimeError: Calculated padded input size per channel: (40 x 1). Kernel size: (1 x 2). Kernel size can’t be greater than actual input size