pytorch-mcn icon indicating copy to clipboard operation
pytorch-mcn copied to clipboard

for key in ['met','params','layers']: assert key in mcn.keys()

Open YNX940214 opened this issue 7 years ago • 3 comments
trafficstars

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

YNX940214 avatar May 02 '18 12:05 YNX940214

@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

d2sys avatar Aug 13 '18 12:08 d2sys

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?

Lkn1995 avatar Jul 02 '19 02:07 Lkn1995

I replace lines 49-54 with this line: mcn_net=pmu.parse_struct(mcn['net']) it's ok.

suyanzhou626 avatar Aug 13 '19 03:08 suyanzhou626