Giter Site home page Giter Site logo

Questions about NCEAverage.py about cmc HOT 5 CLOSED

hobbitlong avatar hobbitlong commented on August 24, 2024
Questions about NCEAverage.py

from cmc.

Comments (5)

vinsis avatar vinsis commented on August 24, 2024

Update: I realized torch.no_grad() is to prevent the issue of buffers being cleared.

In reference to the last point, after some thought I think I realize why torch.no_grad() is used. It is to make sure the gradients associated with l and ab are not stored in the memory bank.

from cmc.

vinsis avatar vinsis commented on August 24, 2024

In reference to the third point, I think one need not define a context as was done in CPC. A simple dot product followed by likelihood maximization should be enough. There is no parameter to be optimized.

from cmc.

vinsis avatar vinsis commented on August 24, 2024

I think I figured out answers to most of the questions I asked. However I still don't know the purpose of T. I would really appreciate it if you could answer. Thanks.

from cmc.

HobbitLong avatar HobbitLong commented on August 24, 2024

Hi, sorry for missing the message.

So T is used to adjust the dynamic range of the score before softmax-ce. As the features are normalized, inner product only gives you something between -1 and 1, which is insufficient for discriminative positives from negatives. So T plays the role to adjust the range.

from cmc.

vinsis avatar vinsis commented on August 24, 2024

Ah I see. So T is a hyperparameter whose value was decided empirically I guess. Thank you!
Closing the issue now.

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.