Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
YNX940214 opened this issue May 2, 2018 · 3 comments
Open

Comments

@YNX940214
Copy link

YNX940214 commented May 2, 2018

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

@d2sys
Copy link

d2sys commented Aug 13, 2018

@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

@Lkn1995
Copy link

Lkn1995 commented Jul 2, 2019

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?

@suyanzhou626
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants