I don’t think the GitHub repository is the right place to ask questions about the usage of modules, as it’s intended to create issues in case the framework itself encounters a bug.
For your use case: since you cannot see what Keras is doing in the background, you could try to compare the results between Keras and PyTorch by adding the missing dimensions.
I.e. the PyTorch layer expects e.g. query to have the shape:

query: (L,N,E) where L is the target sequence length, N is the batch size, E is the embedding dimension.

Based on this one dimension is missing in your input (could it be the batch dimension?).
If so, use input_tensor = input_tensor.unsqueeze(1) and pass it to the module.