GithubHelp home page GithubHelp logo

Comments (7)

DonkeyShot21 avatar DonkeyShot21 commented on August 16, 2024 1

The branch has been merged into main.

from uno.

DonkeyShot21 avatar DonkeyShot21 commented on August 16, 2024

Hi,

Thanks for your interest in our work.

I don't remember exactly how I implemented it but for sure you will need to:

  1. do not concat here
    logits = torch.cat([outputs["logits_lab"], outputs["logits_unlab"]], dim=-1)
  2. the shape of this tensor will also change
    targets = torch.zeros_like(logits)
  3. change the slicing in this loop
    # generate pseudo-labels with sinkhorn-knopp and fill unlab targets
  4. use the swapped prediction only for the unlab samples
    # compute swapped prediction loss
  5. here add cross-entropy on the labeled samples, something like F.cross_entropy(logits_lab, targets_lab)
    loss = (loss_cluster + loss_overcluster) / 2

Something like this. It should not be too hard. Remember that the repo now contains code for UNO v2 that performs much better than the original version, so results are gonna be different.

from uno.

ziyunli-2023 avatar ziyunli-2023 commented on August 16, 2024

what's the main difference between v1 and v2? I note that you fix cross_entropy loss.
And I also have another problem? do you think multiple heads(unlabel heads) help a lot for the performance?

from uno.

ziyunli-2023 avatar ziyunli-2023 commented on August 16, 2024

Thank you so much for the fast reply! I will implement it following your guides

from uno.

DonkeyShot21 avatar DonkeyShot21 commented on August 16, 2024

The main difference is in the augmentations. I recommend you use the new version. With UNO v2 multiple heads do not help as much as before, so if you want to speed up computation you can decrease the number of heads.

from uno.

JosephKJ avatar JosephKJ commented on August 16, 2024

Hi Enrico,

The main difference is in the augmentations.

But, I find that both transforms.py are identical in master and v2 branch. Had the new changes been ported to both the branches alike?

Kindly clarify when you are free. Thanks in advance!

~ Joseph

from uno.

JosephKJ avatar JosephKJ commented on August 16, 2024

Great! Thanks!

from uno.

Related Issues (14)

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.