Here you call a number of methods that we do not know what they do, so it could be a bit hard to run the code you provided. A good idea could be to post a code snippet that anyone could just copy, paste it into a file and run it directly. For this you could use torch.rand() tensors with the dimensions of your expected inputs.
For me, an idea comes up to mind, which is to print the amount of time each method takes to run. That way you could see where your bottleneck is.