oh, okay.
After model forward, I get an output which is the feature map of the image since I cut off average pooling and fc layer of resnet-50. And I sum all of elements in feature map tensor, and I get 90000 from python and 180000 from c++. I think it is not caused by float precision since the gap is too huge. Since all of parameters are same, I only can doubt whether the buffers are applied correctly when model runs forward process.
I’ve checked the resize result of c++ and python are same. The reason I’ve checked it is that someone said using PIL or opencv may cause the different results.
Again, thank you so much for your quick and helpful reply everytime!