#82 · Primary category: Deep Learning Frameworks
torchmetrics
Machine learning metrics for distributed, scalable PyTorch applications.
Project last updated:08/20/26
GitHub Stars
2.5K
Forks
518
Contributors
294
License
Apache-2.0
Why we included this project
When you train PyTorch models, getting evaluation numbers right is half the work, and TorchMetrics removes the most error-prone part of that. It bundles more than a hundred tested metric implementations behind a consistent module interface, so your training loop stays clean and reproducible. That covers the usual classification measures like accuracy, F1, and precision/recall, plus separate metrics for audio, image, and text tasks. The metrics behave like regular PyTorch modules with internal state, which means they accumulate over batches automatically and synchronize across GPUs or multiple nodes without you hand-writing the distributed bookkeeping. That matters for teams doing multi-GPU or multi-node training, where naive metric accumulation often silently corrupts results. Teams already using PyTorch Lightning get logging integration for free, but the library works just as well inside a hand-rolled loop, and you can subclass a base module to write your own custom metrics with the same stateful behavior.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
tensorflow
An Open Source Machine Learning Framework for Everyone
pytorch
Tensors and Dynamic neural networks in Python with strong GPU acceleration
keras
Deep Learning for humans
nanoGPT
The simplest, fastest repository for training/finetuning medium-sized GPTs.
ray
Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.