tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

After converting my PyTorch model to Tensorflow, the output prediction changes

Open laurence-lin opened this issue 4 years ago • 1 comments

I'd got a dog image, and I attempt to use a Pytorch model to classify, then convert it to ONNX and to Tensorflow type.

I expect to get a same classification result, since it's originally the same model. However, the Pytorch model outputs "tennis_ball" class while Tensorflow model outputs "Samoyed" class.

Based on the true label, I suppose the Tensorflow model is more accurate, but that result confused me. Why would the same model perform differently?

How could I do to make it static for the model performance?

Here is my working process: https://colab.research.google.com/drive/1pBU_pYdmBHPEPf2C5fRTGkP_cs5kxL0e?usp=sharing

laurence-lin avatar May 17 '21 08:05 laurence-lin

You might get a better response at github.com/pytorch/pytorch

yuslepukhin avatar Jun 21 '21 18:06 yuslepukhin