Giter Site home page Giter Site logo

Comments (11)

yinboc avatar yinboc commented on May 31, 2024

Hi. I didn't get the point maybe. Classifier-baseline is trained with cross entropy loss, after training it can perform few-shot learning tasks by cosine nearest-centroid.

from few-shot-meta-baseline.

whySnowwW avatar whySnowwW commented on May 31, 2024

Thanks for your help. Do you mean that the classifier baseline can do some beautiful work when I use it in a few shot classification task?

from few-shot-meta-baseline.

whySnowwW avatar whySnowwW commented on May 31, 2024

And I also have some trouble in getting the output of the prediction of the classifier. Is that the logit ?

from few-shot-meta-baseline.

yinboc avatar yinboc commented on May 31, 2024

Yes, the variable 'logits' in the code refers to the predicted logits of current batch.

from few-shot-meta-baseline.

whySnowwW avatar whySnowwW commented on May 31, 2024

And i also get some question on the classifier baseline:
i wonder if the model use the encoder to solve the few shot classification issue by cosine distance in the code or through the meta learning method?
and also , i find that in the test-few-shot.py, the dataloader label is the index of the true label, am i correct or is that some kind of mistake i made?

from few-shot-meta-baseline.

yinboc avatar yinboc commented on May 31, 2024

Classifier baseline does not perform meta-learning (more details are in the paper).
In the code, the labels are "local label", i.e. the label in current N-way K-shot task.

from few-shot-meta-baseline.

whySnowwW avatar whySnowwW commented on May 31, 2024

If so, does the code perform few shot classifier in the classifier baseline through using cosine distance?

from few-shot-meta-baseline.

whySnowwW avatar whySnowwW commented on May 31, 2024

And in the train_classifier.py , there is a few-shot eval , what is this stage used for?

from few-shot-meta-baseline.

yinboc avatar yinboc commented on May 31, 2024

Yes, it classifies with cos distance. In train_classifier.py few-shot eval is evaluating the few-shot performance of current model (i.e. applying cos nearest-centroid to current classifier for few-shot tasks). It is for checking the trend of the performance.

from few-shot-meta-baseline.

whySnowwW avatar whySnowwW commented on May 31, 2024

Thanks for your patience, but i still have an issue why do we need test dataset in the train stage?

from few-shot-meta-baseline.

yinboc avatar yinboc commented on May 31, 2024

You're welcome.
It is evaluating the model after each epoch, so that we can see a performance curve during training. You can delete this stage if you are not interest in these information.

from few-shot-meta-baseline.

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.