pytorch-metric-learning
Easily implement deep metric learning in applications using PyTorch
GraphCanon updated Sep 20, 2026 · GitHub synced Sep 20, 2026
Decision brief
Unverified catalog guidance: PyTorch Metric Learning is specifically tailored for those leveraging PyTorch and interested in applications that require distance-based learning approaches like computer vision or self-supervised learning tasks.
Good fit when
- Unverified catalog guidance: When you are working with the PyTorch framework and intend to implement deep metric learning techniques.
- Unverified catalog guidance: For projects requiring image retrieval or classification where embeddings generated through contrastive learning can improve performance.
Avoid when
- Unverified catalog guidance: Avoid if you are not working within the PyTorch framework and prefer to use another deep learning library as this tool is tightly integrated with PyTorch.
- Unverified catalog guidance: If your project requires a less modular setup, where customization might be more cumbersome due to pytorch-metric-learning's design towards flexibility and modularity.
- Hosting:
- library - Provides functions for implementing deep metric learning models within PyTorch.
- Pricing:
- freemium - Free to use under the MIT license, with no direct costs but may require resource investment for implementation and support.
Observed Jul 12, 2026 · Source: enrich:decision_facts
Verify the decision
Maintenance and security
Full trust report- Maintenance
- Dormant (398d since push)
- As of Sep 20, 2026
- Provenance
- Not a fork · Personal account
- As of Sep 20, 2026
- Security (OSV)
- No lockfile
- As of Jul 11, 2026
Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.
Install
Package installation is not established from the available documentation. Check the source repository for setup instructions.
git clone https://github.com/kevinmusgrave/pytorch-metric-learningSource repositoryRelationship proposals(1)
Relationship types and rationales are stored proposals, not independently verified integrations, migration guidance or endorsements.
Relationship graph
Optional deeper exploration of typed edges and category neighbours.
Relationship types and rationales are stored proposals, not independently verified integrations, migration guidance or endorsements.
Similar tools
Same-category neighbours not already linked as typed edges.
Evidence and technical details
Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.
Overview
A flexible and modular framework for deep metric learning that simplifies integration into various machine learning projects, particularly under the PyTorch framework.
Capability facts
- Languages
- python
Source: github.language · Sep 20, 2026
Categories
Compatibility
Sourced claims from the README excerpt - not unsourced marketing copy.
Source: README excerpt (regex_v1, Sep 20, 2026)
```python from pytorch_metric_learning import lossesSource link
Tags
README
<h1 <a href="https://github.com/KevinMusgrave/pytorch metric learning" <img alt="PyTorch Metric Learning" src="https://github.com/KevinMusgrave/pytorch metric learning/blob/master/docs/imgs/Logo2.png" </a </h1 <p align="center" <a href="https://pypi.org/project/pytorch metric lea...
For agents
This page has a .md twin and JSON over the API.