Giter Site home page Giter Site logo

Question about softmax loss about cmc HOT 6 CLOSED

hobbitlong avatar hobbitlong commented on July 22, 2024
Question about softmax loss

from cmc.

Comments (6)

hyBlue avatar hyBlue commented on July 22, 2024

I'm an idiot

from cmc.

vinsis avatar vinsis commented on July 22, 2024

@hyBlue seems you found out the answer yourself. Could you explain what NCESoftmaxLoss is trying to do here? I am having the same doubt as you initially had (and feeling like an idiot).

from cmc.

vinsis avatar vinsis commented on July 22, 2024

Explanation: label = torch.zeros([bsz]).cuda().long() means the labels are [1, 0, 0, 0, ...] for each sample. label specifies the label of the positive sample, which is 0 in each case.

It's funny how easy it is to get confused even with something you think you are fairly familiar with.

from cmc.

hyBlue avatar hyBlue commented on July 22, 2024

@vinsis Great! You're right

from cmc.

zhyever avatar zhyever commented on July 22, 2024

Thanks a lot! (A new idiot)

from cmc.

jessico avatar jessico commented on July 22, 2024

triple idiot.

from cmc.

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.