I trained a model (using GPU) under ubuntu, then I put this model on the cpu (.cpu()) and turned it into a .pt file through torch.jit.trace, and another computer (windows) uses the cpu version libtorch load model, under the same input, returned different results.
Do you have any idea where this difference could be coming from?
How large are these differences? Since you are tracing the model, I assume that no data-dependent control flow is expected? Are you using static inputs (e.g.
torch.ones) or “real” data?
There is no control flow in the model and inputs is duplicate data，output is a matrix,some elements in the matrix have an error of about e-2.
Thanks for the update! Are you seeing the same difference with the plain PyTorch model without tracing it and using
liborch? Also, are you seeing a difference on the same OS between the Python and