Coder Social home page Coder Social logo

Comments (5)

cyf518 avatar cyf518 commented on June 28, 2024 3

same issue

from ext_portrait_segmentation.

qiutzh avatar qiutzh commented on June 28, 2024

@cyf518 Hi, did you solve the problem?

from ext_portrait_segmentation.

cyf518 avatar cyf518 commented on June 28, 2024

@qiutzh
i change net = Dnc_SINet(classes=1, p=2, q=8, chnn=1) to net = Dnc_SINet(classes=2, p=2, q=8, chnn=1)

from ext_portrait_segmentation.

YAwei666 avatar YAwei666 commented on June 28, 2024

@qiutzh
i change net = Dnc_SINet(classes=1, p=2, q=8, chnn=1) to net = Dnc_SINet(classes=2, p=2, q=8, chnn=1)
RuntimeError: weight tensor should be defined either for all or no classes at /pytorch/aten/src/THCUNN/generic/SpatialClassNLLCriterion.cu:27
when I changed this,another problem accurs. do you know how to solve this ?

from ext_portrait_segmentation.

aguthrie19 avatar aguthrie19 commented on June 28, 2024

It looks like at least one of these, maybe both, is incorrect:

  • the "chnn" integer in your .json (ex setting/SINet.json or whichever you're using when loading your model)
  • or the "resume" checkpoint in your .json (ex result/training_session/checkpoint.pth.tar)

For whatever reason, your code is trying to combine a SINet.pth model with a checkpoint model, but it can't because SINet.pth expects 2 channels and your checkpoint provides configurations for only 1 channel.

Hope this helps! Share a snippet of the code you're running for more help.

from ext_portrait_segmentation.

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.