albanie / mcnPyTorch

Model converter (PyTorch -> MatConvNet)
MIT License
62 stars 12 forks source link

How to use the converted model ? #8

Open iminfine opened 4 years ago

iminfine commented 4 years ago

I converted PyTorch model to MatConvNet successfully, however I can't use it. Because the structure of the converted model is different from the pertained model in MatConvNet model zoo. Could you please tell me how to use the converted model?

Besides, the 354 line of import_pytorch.py might have a bug, I changed it from bool(module.bias) to bool(len(module.bias)), is that ok?

iminfine commented 4 years ago

The pertained model provided by MatOnvNet official has a structure like this: 1 And the converted model is: 2 The additional params in the converted model are weights of the network, they locate in each layer of the pertained model as layers(1,i).weights. i is the layer number.