GithubHelp home page GithubHelp logo

Comments (5)

wfus avatar wfus commented on May 9, 2024 1

I was able to fix it by just directly modifying the .json file containing the model definition after exporting it. Then after reloading the new model file everything works.

from gluon-cv.

zhanghang1989 avatar zhanghang1989 commented on May 9, 2024

This looks wired. I will take a look

from gluon-cv.

ragavvenkatesan avatar ragavvenkatesan commented on May 9, 2024

Any updates on this?

from gluon-cv.

Ishitori avatar Ishitori commented on May 9, 2024

There was another encounter with similar issue here. I decided to reproduce it, and it seems that the issue is still there.

I have latest version of MXNet (1.3.1) and gluoncv (0.3.0) and I confirm that it acts weird - there are some non-unique names are used. Here is the example to reproduce it:

import gluoncv
import mxnet as mx
from mxnet import gluon

pretrained_net = gluoncv.model_zoo.get_fcn(dataset='pascal_voc', backbone='resnet50', pretrained=False)
pretrained_net.hybridize()

item = mx.random.uniform(shape=(1, 3, 512, 512))
pretrained_net(item)

pretrained_net.export("/tmp/fcn_resnet50_v1b")

deserialized_net = gluon.nn.SymbolBlock.imports("/tmp/fcn_resnet50_v1b-symbol.json", ['data'],
                                                "/tmp/fcn_resnet50_v1b-0000.params")

So I basically get the model, hybridize and do a forward pass, then export it to file system, and then load it back. If I do that I get:

ValueError: There are multiple outputs with name "fcn0_resnetv1b0_layers1_relu0_fwd_output"

I wrote a custom python script to parse json file and there are multiple nodes with same name. The full list I receive is:

fcn0_resnetv1b0_layers1_relu0_fwd
fcn0_resnetv1b0_layers1_relu0_fwd
fcn0_resnetv1b0_layers1_relu1_fwd
fcn0_resnetv1b0_layers1_relu1_fwd
fcn0_resnetv1b0_layers1_relu2_fwd
fcn0_resnetv1b0_layers1_relu2_fwd
fcn0_resnetv1b0_layers2_relu0_fwd
fcn0_resnetv1b0_layers2_relu0_fwd
fcn0_resnetv1b0_layers2_relu1_fwd
fcn0_resnetv1b0_layers2_relu1_fwd
fcn0_resnetv1b0_layers2_relu2_fwd
fcn0_resnetv1b0_layers2_relu2_fwd
fcn0_resnetv1b0_layers2_relu3_fwd
fcn0_resnetv1b0_layers2_relu3_fwd
fcn0_resnetv1b0_layers3_relu0_fwd
fcn0_resnetv1b0_layers3_relu0_fwd
fcn0_resnetv1b0_layers3_relu1_fwd
fcn0_resnetv1b0_layers3_relu1_fwd
fcn0_resnetv1b0_layers3_relu2_fwd
fcn0_resnetv1b0_layers3_relu2_fwd
fcn0_resnetv1b0_layers3_relu3_fwd
fcn0_resnetv1b0_layers3_relu3_fwd
fcn0_resnetv1b0_layers3_relu4_fwd
fcn0_resnetv1b0_layers3_relu4_fwd
fcn0_resnetv1b0_layers3_relu5_fwd
fcn0_resnetv1b0_layers3_relu5_fwd
fcn0_resnetv1b0_layers4_relu0_fwd
fcn0_resnetv1b0_layers4_relu0_fwd
fcn0_resnetv1b0_layers4_relu1_fwd
fcn0_resnetv1b0_layers4_relu1_fwd
fcn0_resnetv1b0_layers4_relu2_fwd
fcn0_resnetv1b0_layers4_relu2_fwd

Interesting, that they all are RELU.

from gluon-cv.

github-actions avatar github-actions commented on May 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from gluon-cv.

Related Issues (20)

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.