Giter Site home page Giter Site logo

Comments (5)

DrSleep avatar DrSleep commented on July 18, 2024

What kind of data do you use?

In my experience, this error is usually seen when your target masks have labels larger than the channel dimension of your prediction present.
As a sanity check, you can print soft_output.size(1) and torch.unique(target_var) before computing the loss

from light-weight-refinenet.

csufangyu avatar csufangyu commented on July 18, 2024

What kind of data do you use?

In my experience, this error is usually seen when your target masks have labels larger than the channel dimension of your prediction present.
As a sanity check, you can print soft_output.size(1) and torch.unique(target_var) before computing the loss

thanks very much! I use NYUv2,but I find 56 classes!
40 56 tensor([ 0, 2, 3, 5, 6, 7, 8, 9, 11, 13, 14, 15, 17, 19, 20, 21, 24, 34, 35, 36, 39, 42, 45, 49, 55, 59, 64, 70, 73, 74, 75, 80, 82, 83, 93, 111, 113, 119, 133, 138, 141, 144, 148, 156, 157, 158, 160, 161, 175, 177, 181, 206, 234, 239, 243, 255], device='cuda:0')

from light-weight-refinenet.

DrSleep avatar DrSleep commented on July 18, 2024

everything above 39 should not be there. check out the NYUDv2 instruction from their site - you may need to run a matlab script to convert the labels

I will try to upload the dataset with the correct labels this week

from light-weight-refinenet.

csufangyu avatar csufangyu commented on July 18, 2024

everything above 39 should not be there. check out the NYUDv2 instruction from their site - you may need to run a matlab script to convert the labels

I will try to upload the dataset with the correct labels this week

I have solved it !thanks very much!

from light-weight-refinenet.

DrSleep avatar DrSleep commented on July 18, 2024

great, no worries!

from light-weight-refinenet.

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.