Here are a few differences skimming through the code:

Keras uses Conv1D-BN-ReLU, while your PyTorch model uses Conv1d-ReLU-BN1d-ReLU
I’m not sure what GlobalAveragePooling1D is exactly doing, but I assume you made sure torch.mean(..., 2) is doing the same

nn.CrossEntropyLoss expects raw logits, so you should remove the F.softmax call

Could you fix these issues and try it again?