I’m trying to translate my Keras code to PyTorch. In my Keras code I use GlobalMaxPooling1D after the last 1D convolutional layer:
result = GlobalMaxPooling1D()(previous_result).

In Pytorch I’m trying to use MaxPool1d. I guess the stride should be 0 but I’ve no idea about the value of kernel_size. Should it be the same size as the kernel in the last convolutional layer?