Your Keras model seems to use 5 layers, while your PyTorch model only defines 4, so you might want to add the missing layer.
Also, nn.CrossEntropyLoss expects the raw logits as the model output, so you should remove the softmax in your PyTorch model at the end of the forward.