Git Product home page Git Product logo

Comments (3)

cdluminate avatar cdluminate commented on May 30, 2024

thank you for this question. In fact 8 epochs in the code is equivalent to 16 epochs in the paper. That's because the SPC-2 batch sampler will traverse the whole dataset twice every epoch, see https://github.com/cdluminate/robrank/blob/main/robrank/datasets/mnist.py#L124 .

Firstly you can see that dataloader will traverse the whole dataset through __getitem__, and the sample at index will be used as the anchor. Besides, a positive sample is obtained independently, which means we have sampled twice of the data we are expected to sample in every epoch. In that sense, an epoch of SPC-2 data is equivalent to 2 epochs for classification. This is a fixable minor problem, but not necessary to fix.

from robrank.

cdluminate avatar cdluminate commented on May 30, 2024

Just as what I have written in the comment: max epoch means epochs with classification batch, which equals 2 times the epochs with spc-2 batchs. If you really want to change maxepoch, the code snippet on the screenshot is indeed the variable to change. Maybe you have tried to python3 setup.py install before changing the configuration, and your following experiments just imported the old config instead of the new one under your current working directory. python3 setup.py install is not recommended if you want to change the code and do some further development work, or you will have to install again and again after every code change due to python import order.

from robrank.

shgal637 avatar shgal637 commented on May 30, 2024

Thank you for your answer!

from robrank.

Related Issues (18)

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.