pytorch-metric-learning icon indicating copy to clipboard operation
pytorch-metric-learning copied to clipboard

The easiest way to use deep metric learning in your application. Modular, flexible, and extensible. Written in PyTorch.

Results 97 pytorch-metric-learning issues
Sort by recently updated
recently updated
newest added

Since metric learning is very useful for ranking tasks, I'd like to suggest including the [ApproxNDCGLoss](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/losses/ApproxNDCGLoss) and other ranking losses such as [L2R losses](https://pytorchltr.readthedocs.io/en/stable/loss.html) using the PML approach.

new algorithm request

I implemented the [Multi-SupConLoss](https://sslneurips22.github.io/paper_pdfs/paper_8.pdf) as mentioned in issue #658. However, this implementation rewrote a lot of functions because many functions conflicted with the multi-label task such as [check_shapes](https://github.com/KevinMusgrave/pytorch-metric-learning/blob/ac607007dc62666f9de850cd5b8e5694ff0da1c2/src/pytorch_metric_learning/utils/common_functions.py#L389) and [get_matches_and_diffs](https://github.com/KevinMusgrave/pytorch-metric-learning/blob/ac607007dc62666f9de850cd5b8e5694ff0da1c2/src/pytorch_metric_learning/utils/loss_and_miner_utils.py#L31)....

Not a real bug, and maybe it's just personal preference, but I feel like the normalization in several distances is counterintuitive. For example, the documentation for `CosineSimilarity`, says > This...

bug
documentation

It is a great package that improves my efficiency , When I test cifar10, for the one-hot label , I can use ```python label = torch.argmax(label,dim=1) ``` to transform one-hot...

enhancement

This [paper](https://sslneurips22.github.io/paper_pdfs/paper_8.pdf) introduced a new loss function called `MultiSupCon` that allows us to gain knowledge about the degree of label overlap between pairs of samples. I was just wondering if...

new algorithm request

I have put my thought in refactoring reducers and mixins. In some cases i have updated the tests relative to new functionality that could be added easily to the reducers....

I have tried to solve these issues. All the pre-existing tests work fine, but i did not create new ones since i have just refactored the same code. I have...

As suggested and implemented in pull request #635 by @domenicoMuscill0. I'm removing this feature from that PR because it's already a large PR. Here's the implementation by @domenicoMuscill0: ```python def...

enhancement