Open dhorka opened 5 years ago
Hi @dhorka , please refer to How to load the converted PyTorch model. Thanks!
Hi @rainLiuplus, thanks , this solved my issue! Sorry for have not read it before. I did not found this document :( I would like to ask another doubt. The idea of convert this model to pytorch is because I would like to retrain the model. Is there any issue or something that I need to take into account to re-train a model converted by mmdnn?
Hi @dhorka, the converted model file .py
only contains the definition of network architecture and the .npy
file is the weights. So for re-training the model, in addition to loading the model, you also need to write some training codes to train the model. Thanks!
Platform (like ubuntu 16.04/win10): Ubuntu 16
Python version: 2.7
Source framework with version (like Tensorflow 1.4.1 with GPU): Caffe
Destination framework with version (like CNTK 2.3 with GPU): Pytorch 0.4.1
Pre-trained model path (webpath or webdisk path): https://github.com/CSAILVision/places365 In specific I am trying to convert VGG16-hybrid1365 and ResNet152-hybrid1365
Running scripts: mmconvert --srcFramework caffe --inputWeight vgg16_hybrid1365.caffemodel --inputNetwork deploy_vgg16_hybrid1365.prototxt --dstFramework pytorch -om vgg16places.pth
Hi,
As I described above, I am trying to convert places caffe pre-trained models to pytorch. The convertion procedure finish without error, but, When I want to use it I have troubles. These files are generated:
vgg16places.pth
vgg16places.py
The code that I am using in order to use the converted files is :
Am I doing something wrong? I would appreciate if someone can give me a clue in order to solve this issue.