Giter VIP home page Giter VIP logo

Comments (6)

KevinMusgrave avatar KevinMusgrave commented on July 2, 2024 1

Hi, I'm the author of PyTorch Metric Learning. I wandered in here after I noticed this repo in my dependencies list.

Not sure if this is the cause, but FYI if you have pytorch-metric-learning >= v0.9.90 and pytorch < 1.6.0, the loss will be NaN. This is due to a bug in pytorch that was only fixed in 1.6.0. So if you can't use pytorch 1.6.0, you should use pytorch-metric-learning <= v0.9.89.

from sl-dml.

ilikeokoge avatar ilikeokoge commented on July 2, 2024 1

Hi, Kevin. Thanks for your kindness and a great package!

Since I use Pytorch ==1.5.0, I downgrade pytorch-metric-learning to v.0.9.89 and it works well.
Thanks for your help!

from sl-dml.

raphaelmemmesheimer avatar raphaelmemmesheimer commented on July 2, 2024

Great to hear, that you managed to start training now. Just to make sure. You are using the most recent version from github?
What exact command did you use? I try to reproduce the error then.
Further, the most valuable information from the error is cut. I just see that train.py throws an error. I assume that the loss is overloading for a reason.

You can try this command, to see if something happens to the metric loss:

python train.py dataset=ntu_swap_axis loss=only_classifier

You could also check if the error happens with one of the other datasets , looks like you are using the NTU 120 one shot experiments. E.g. with the Simitate experiment as described here.

from sl-dml.

ilikeokoge avatar ilikeokoge commented on July 2, 2024

Yes, I downloaded the newest version from GitHub.
I created env with requirements.txt and cudatoolkit==10.1.
I tried python train.py dataset=ntu_swap_axis and encountered the error.
image

I tried python train.py dataset=ntu_swap_axis loss=only_classifier with one epoch and it works well. (total_loss is calculated.)

from sl-dml.

raphaelmemmesheimer avatar raphaelmemmesheimer commented on July 2, 2024

@KevinMusgrave, first thanks for actively joining this issue. I will missuse the issue to also thank you for the great pytorch-metric-learning library, which I think is a great contribution towards more reproducible and comparable metric learning approaches. I also recently read your "A metric learning reality check" paper [1] which pointed me out to a great set of hyperparameters and flaws in the training and evaluation strategy of the first preprint. I tried my best to follow your suggestions where applicable to which an updated preprint will follow.

[1]: Musgrave, Kevin, Serge Belongie, and Ser-Nam Lim. "A metric learning reality check." arXiv preprint arXiv:2003.08505 (2020).

from sl-dml.

KevinMusgrave avatar KevinMusgrave commented on July 2, 2024

Thanks for the kind words 😄

from sl-dml.

Related Issues (4)

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.