Code Monkey home page Code Monkey logo

gluon2pytorch's People

Contributors

gmalivenko avatar mjamroz 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

Watchers

 avatar  avatar  avatar  avatar

gluon2pytorch's Issues

'Module' object is not callable

I loaded the model from .json and .params,
sym, arg_params, aux_params = mx.model.load_checkpoint(prefix[3], epoch[3])
mod = mx.mod.Module(symbol=L106_Net96_v2("test"), context=mx.gpu(), data_names=['data'], label_names=['landmark_target'])
mod.bind(for_training=False, data_shapes=[('data', (batch_size[3], 3, 96, 96))])
mod.set_params(arg_params, aux_params)
When I call pytorch_model = gluon2pytorch(mod, [(batch_size[3], 3, 96, 96)], dst_dir=None, pytorch_module_name='Test')
Return: TypeError: 'Module' object is not callable

How can I solve this problem?How to convert module to be hybrid ?

'DeepLabV3Plus' conversion error

I would like to convert a Gluoncv pretrained model 'gluoncv.model_zoo.DeepLabV3Plus' to Pytorch one, but SyntaxError appears during conversion:

self.17 = nn.ConstantPad2d(padding=(1, 1, 1, 1), value=0)
          ^
SyntaxError: invalid syntax

The executable code:

net = gluoncv.model_zoo.DeepLabV3Plus(nclass=4, crop_size=224)
net.hybridize()
net.collect_params().initialize()
model = gluon2pytorch(net, [(1, 3, 224, 224)], dst_dir=None, pytorch_module_name='DeepLabv3')

Thank you in advance for your attention.

self.x11 to self.conv1?

Nice work! I wonder why you change the class attributes name from the original ones like self.conv1, self.bn1, etc to self.x345, self.x347? That would potentially pose problems when we need to use the class attributes after conversion.

Could you share your thoughts on how to change the script to keep the original class attributes? Thanks.

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.