I have converted two models (vgg16 and resnet50) from Keras with TensorFlow backend (from as model.save file) into PyTorch using mmdnn. This was done with the following:
mmconvert -sf keras -iw vgg.h5 -df pytorch -om keras_to_torch.pt A = imp.load_source('MainModel','/weights/keras_to_torch.py') model = torch.load('/weights/keras_to_torch.pt')
Predicting on the same data set gave me a different set of results so I investigated further.
I can see that the weights for all the convolutional layers are the same (after transposing), however the weights of the fully connected layers at the end are not.
Is there a reason this should be? As i understand they should be equivalent