百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

pytorch-metric-learning

> 编程语言
开源

在您的应用中使用深度度量学习的最简单方法。模块化、灵活且可扩展。基于 PyTorch 编写。

6.3K stars0 点赞2 次浏览
访问官网GitHub

工具介绍

在您的应用中使用深度度量学习的最简单方法。模块化、灵活且可扩展。基于 PyTorch 编写。

## 新闻 **8月17日**:v2.9.0 - 添加了 [SmoothAPLoss](https://kevinmusgrave.github.io/pytorch-metric-learning/losses/#smoothaploss)。 - 改进了 SubCenterArcFaceLoss 和 GenericPairLoss。 - 感谢 [ir2718](https://github.com/ir2718)、[lucamarini22](https://github.com/lucamarini22) 和 [marcpaga](https://github.com/marcpaga)。 **12月11日**:v2.8.0 - 新增了 [Datasets](https://kevinmusgrave.github.io/pytorch-metric-learning/datasets) 模块,便于下载常用数据集: - [CUB200](https://kevinmusgrave.github.io/pytorch-metric-learning/datasets/#cub-200-2011) - [Cars196](https://kevinmusgrave.github.io/pytorch-metric-learning/datasets/#cars196) - [INaturalist 2018](https://kevinmusgrave.github.io/pytorch-metric-learning/datasets/#inaturalist2018) - [斯坦福在线商品数据集](https://kevinmusgrave.github.io/pytorch-metric-learning/datasets/#stanfordonlineproducts) - 感谢 [ir2718](https://github.com/ir2718)。

文档

  • 在此查看文档
  • 在此查看安装说明
  • 在此查看可用的损失函数、miner 等

Google Colab 示例

请查看 examples 文件夹,其中包含可下载或在 Google Colab 上运行的笔记本。

PyTorch Metric Learning 概述

本库包含 9 个模块,每个模块都可以在您现有的代码库中独立使用,也可以组合起来完成完整的训练/测试工作流程。

损失函数的工作原理

在训练循环中使用损失函数和 miner

让我们初始化一个普通的 TripletMarginLoss:

python
fr

Issues· 77 开放

查看全部 Issues在 GitHub 打开
  • #753

    在 MetricLossOnly.ipynb 示例中,MLP 中线性层前的 RELU

    bug更新于 2026年5月21日
  • #742

    多标签

    更新于 2026年3月21日
  • #748

    关于 TripletMarginLoss + CrossBatchMemory 的奇怪现象

    bug更新于 2025年10月9日
  • #749

    HierarchicalSampler 没有作为 batch_sampler 参数传递

    bug更新于 2025年9月16日
  • #739

    当我使用 MultiSupConLoss 时出现此错误

    更新于 2024年12月28日
  • #658

    SupConLoss 的多标签版本

    new algorithm request更新于 2024年12月26日
  • #737

    允许为 AccuracyCalculator 的 `device` 参数指定字符串

    enhancement更新于 2024年12月21日
  • #738

    AccuracyCalculator: 当 `embeddings` 为 NaN 时,显示更清晰的异常消息

    更新于 2024年12月21日
  • #733

    用于查找最佳阈值的工具?

    更新于 2024年11月24日
  • #730

    faiss 是否应该是一个要求?

    更新于 2024年11月15日

> 标签

Pythoncomputer-visioncontrastive-learningdeep-learningdeep-metric-learning

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月25日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言