pytorch-mcn
pytorch-mcn copied to clipboard
for key in ['met','params','layers']: assert key in mcn.keys()
I am new in DeepLearning and trying to convert a pre-trained net from matconvnet to pytorch. The matconvnet version is 1.0-beta13, i re-saved it in matlab with -v7. When i run the script it says: "for key in ['meta','params','layers']: assert key in mcn.keys()" in "...../pytorch-mcn/python/importer.py", line 49, in load_mcn_net
Can anyone teach how to use the lib? The list of example net is a list of complicated models like "vgg,Alex..." ,but i only need to convert a simple net with only conv and relu and concat. I download the pre-trained model here https://github.com/Yijunmaverick/DeepJointFilter/tree/master/examples/Test/Upsampling_8x.mat
@albanie, can you please share the versions of the libs you are using? scipy and etc.
EDIT:
Ok I managed out how to fix it:
replace lines 49-54 with this line:
mcn_net=pmu.parse_struct(mcn['netStruct'])
in the file importer.py
I replace lines 49-54 with this line: mcn_net=pmu.parse_struct(mcn['netStruct']) When i run the script it says: KeyError:'netStruct' Can anyone teach how to solve it?
I replace lines 49-54 with this line: mcn_net=pmu.parse_struct(mcn['net']) it's ok.