sovrasov/flops-counter.pytorch
A PyTorch library that counts multiply-add operations, parameters, and per-layer costs in deep neural networks.

Velocity · 7d
+1.0
★ / day
Trend
→steady
star history
ptflops is a computational complexity analysis tool for PyTorch models. It supports two backends: a legacy pytorch backend for CNN layer analysis and an aten backend that covers transformer architectures and aten operations. The library can compute FLOPs, parameter counts, and print per-module statistics, making it useful for model benchmarking, optimization, and comparing architectures during research and development.