Closed kevinzezel closed 4 years ago
@kevinzezel , thank you very much for the feedback. Please refer to this FAQ, and add the following code:
import imp
MainModel = imp.load_source('MainModel', "kit_imagenet.py")
before
model = torch.load(model_address).to(device)
Thank you!!
Hi,
I used this commands to convert mxnet resnet50 model to pytorch (https://www.dropbox.com/s/53ftnlarhyrpkg2/retinaface-R50.zip?dl=0):
[14:31:27] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.3.0. Attempting to upgrade... [14:31:27] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded! /opt/conda/lib/python3.6/site-packages/mxnet/module/base_module.py:55: UserWarning: You created Module with Module(..., label_names=['softmax_label']) but input with name 'softmax_label' is not found in symbol.list_arguments(). Did you mean one of: data warnings.warn(msg) Warning: MXNet Parser has not supported operator null with name data. Warning: convert the null operator with name [data] into input layer. IR network structure is saved as [resnet50.json]. IR network structure is saved as [resnet50.pb]. IR weights are saved as [resnet50.npy].
Parse file [resnet50.pb] with binary format successfully. Target network code snippet is saved as [kit_imagenet.py]. Target weights are saved as [kit_pytorch.npy].
PyTorch model file is saved as [resnet50Full.pth], generated by [kit_imagenet.py.py] and [kit_pytorch.npy].
However when I import the model in pytorch I get this error:
mxnet -> 1.6.0 torch -> 1.5.1 torchvision -> 0.6.0a0 mmdnn -> 0.3.0
Machine settings: Ubuntu Linux 18.04 LTS GPUs: 2x Nvidia Tesla V100 32gb CPUs: 2x Intel Xeon E5-2690 v4 RAM: 512GB
Regards, Kevin