albanie / pytorch-mcn Goto Github PK
View Code? Open in Web Editor NEWConvert models from MatConvNet to PyTorch
License: MIT License
Convert models from MatConvNet to PyTorch
License: MIT License
I have download the "imagenet_mcn_vgg_m (weights)", how can I use it in pytorch? And, what the mean and var is of the input image?
It seems that, the magenet_mcn_vgg_m in your pre-convert model is the vgg-m with BN. Now, the pytorch supply the LRN, could you please supply the pre-convert model of vgg-m-2048 without BatchNorm but with LRN?
*** SyntaxError: invalid syntax
> /home/gece/Workspace/pytorch-mcn/python/importer.py(239)extract_dag()
238 else: import ipdb ; ipdb.set_trace()
--> 239 for output, out_ch in zip(node['outputs'], out_chs):
240 in_ch_store[output] = out_ch
ipdb>
I got the above error when trying to convert imagenet-vgg-f and imagenet-vgg-m-1024. I have already converted them to dags using ensure_dags.m.
( I use python3.5, and I can convert imagenet-vgg-verydeep-16 successfully )
Dear Professor,
I could not download the pre-trianed models now.
Could you update the links?
I need the model named vgg_face_dag.pth.
Thanks,
Chawdoe
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
When I imports the trained MatConvNet model https://pan.baidu.com/s/1kWpxAtT into Pytorch, which is trained with code https://github.com/layumi/Pedestrian_Alignment , it get the error as follow: can you import it, verify and public it on your web?
importing net-epoch-23
flattening at
Exporting MatConvNet model to PyTorch (may take some time)...
File "/home/chengzi/pytorch-mcn/python/importer.py", line 277
arch = sg.build_header_str(self.name, **self.meta, debug_mode=self.debug_mode)
^
SyntaxError: invalid syntax
Steps for Convert models from MatConvNet to PyTorch with pytorch-mcn
(1)run pytorch-mcn/compare/ensure_dags.m in matlab to convert models to dagnn...
(2)edit and run shell script importer.sh to Convert models from MatConvNet to PyTorch with pytorch-mcn
(3)the results
Saving imported model definition to ./models/resnext_50_32x4d_pt_mcn.py
Saving imported weights to ./models/resnext_50_32x4d_pt_mcn.pth
Bugs?
(1)Due to the default Python is 2.7 on the most Linux OS, and Python3 means Python3.5 on the the most Linux OS. Thus, I suggest change the python/ipython to python3/ipython3 for using Python3.5 obviously in importer.sh.
(2) The waning "skipping conv bias term"
skipping conv bias term
skipping conv bias term
skipping conv bias term
skipping conv bias term
skipping conv bias term
(3) Errors
> /home/chengzi/Downloads/pytorch-mcn/python/ptmcn_utils.py(66)conv2d_mod()
65 if not valid_conv_groups: import ipdb ; ipdb.set_trace()
---> 66 assert valid_conv_groups, msg
67 num_groups = int(in_ch / fsize[2])
I am trying to load the ICLabel model in PyTorch, named netICL.mat
. Opening the model in Matlab, I can see that the argument meta is empty.
Thus, the converter is failing in build_network
on line 537:
normalization = mcn_net['meta']['normalization']
How can I solve this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.