Thanks @ptrblck. I confused a little bit and want your advice. maybe I have different use case.
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. 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. and while debugging I found that the vgg16 weights is different from pytorch and keras. so, I am trying to share the weights between the two models.
this is all what I did. Do you have any advice about how to solve this problem?