Do you have an idea which part of the code might be wrong or where you were unsure, how to implement a specific use case in PyTorch?
If not, you could try to check the model implementation first e.g. by using a constant input (tensor of all ones should work). Of course you would need to load the parameters from one model to the other and I don’t know, how hard this would be.
Once the models return the same output, you could debug the code step by step.