Coder Social home page Coder Social logo

Comments (5)

leonhardhennig avatar leonhardhennig commented on June 6, 2024

Hi,
there is no train.py, because we didn't do any training. Per few-shot batch, there is 'only', depending on the readout you configure, some fitting done. e.g. in src/fewie/evaluation/classifiers/logistic_regression.py we fit a LR function.

from fewie.

kimkyeonghun avatar kimkyeonghun commented on June 6, 2024

Thank you for your quick response. I understand the answer well enough.

Looking at the paper, it appears that they used contrastive learning. Do you have any hints on how to use it?
Or is it something that is already included in the pre-trained BERT?

from fewie.

leonhardhennig avatar leonhardhennig commented on June 6, 2024

@chen-yuxuan did we include the code for the contrastive learning in the repo?

from fewie.

chen-yuxuan avatar chen-yuxuan commented on June 6, 2024

Thank you for your quick response. I understand the answer well enough.

Looking at the paper, it appears that they used contrastive learning. Do you have any hints on how to use it? Or is it something that is already included in the pre-trained BERT?

Hi, @kimkyeonghun and @leonhardhennig
Yes, it is included in the contrastive-pre-training branch. I think after checking-out this branch, you can run it in quite the same way as for other encoders, since the configuration files for contrastive-variants are available here: https://github.com/DFKI-NLP/fewie/tree/contrastive-pretraining/config/encoder

Also we don't train for vanilla encoders, and don't train by ourselves for other-task/domain fine-tuned encoders (by just using the existing checkpoints from HF). However, we did train for contrastive learning, and in this case, the training logic is contained in the evaluate.py (calling

def eval_few_show_contrastive_training(
) in this branch.

from fewie.

kimkyeonghun avatar kimkyeonghun commented on June 6, 2024

Thank you for your quick and accurate response!

from fewie.

Related Issues (3)

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.