If you are using constant inputs to compare both models, the difference might be large, since the models contain different parameters and might even use different preprocessing steps.



 mohamed_abdullah:

I trained a model using pytorch and it gave me very good results but I need the model in production to be tensorflow. so, I tried to convert the model using pytorch2keras repo but the resulted model gave different results.


I guess that either the preprocessing steps are different or the weight transfer didn’t work properly.



 mohamed_abdullah:

so I tried to build my keras model from scratch. it’s a simple model, just vgg16 pretrained model and two dense layers. after building it also I got different results from pytorch model and the model is overfitting on the same data.


I don’t quite understand this. Is the Keras model