Different behaivour of exported model in TorchScript

Hi there,

I am trying to export and use a model defined in pytorch by using the “torch.jit.script” method. When I try to use the exported model the result obtained is awful if you compare with the original results. The model loads pretrained weigths and after all of these I use the method “torch.jit.script” and save it to the file. I have found some related issue in github, however I have not managed to solve the problem.

Any idea of the problem? Thank you in advance.

Do you have some code to reproduce the issue? It’s hard to say what’s going on without more information

Thank you for your response. Finally, I have managed to get similar results using the exported model. The problem was that the tensor was transposed by using a custom ToTensor transform instead of using the standard ToTensor transform.