Thanks for the input, however, when keeping all common parameters the same when porting from keras to PyTorch (padding=‘valid’ → no padding, stride=(1,1), dilation=(1,1), groups=1), the dimensionalities don’t add up. That’s what’s confusing me.
I know I can achieve the right dimensions when I add padding=(0,5) and kernel_size=(10,2), but that does not seem to result in the same output. The number of parameters for the keras implementation are:
model.summary()

Model: "model_1"
__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to                     
==================================================================================================
input_1 (InputLayer)            [(None, 2, 10, 25)]  0                                            
__________________________________________________________________________________________________
conv2d_5 (Conv2D)               (None, 2, 1, 34)     8534        input_1[0][0]                 

whereas for the PyTorch implementation with padding=(0,5) and kernel_size=(10,2):
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = SoccerModel().to(device)
summary(model, [(2, 10, 25), (2, 1, 11)])

----------------------------------------------------------------
        Layer (type)               Output Shape         Param #
================================================================
            Conv2d-1             [-1, 2, 1, 34]              82