Giter Club home page Giter Club logo

pytorch-mcn's Introduction

pytorch-mcn's People

Contributors

albanie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pytorch-mcn's Issues

SyntaxError: invalid syntax in importer.pyline 277, can you help me?

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

Loading a network with empty 'meta'

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.

image

Thus, the converter is failing in build_network on line 537:

normalization = mcn_net['meta']['normalization']

How can I solve this?

SyntaxError: invalid syntax

*** 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 )

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

vgg-m-2048 without BatchNorm model

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?

I suggest change python/ipython to python3/ipython3 for using Python3.5 obviously in importer.sh

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])

How to use the model?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.