← all repositories

Lyken17/pytorch-OpCounter

A PyTorch library that counts MACs and FLOPs to measure the computational complexity of deep learning models.

5.1k stars Python ML FrameworksLLMOps · Eval
pytorch-OpCounter
Velocity · 7d
+1.7
★ / day
Trend
steady
star history

THOP (Torch-OpCounter) is a profiling tool for PyTorch neural networks that calculates Multiply-Accumulate operations and floating-point operations per second. It supports standard architectures like ResNet, VGG, DenseNet, and SqueezeNet, and provides a custom extension mechanism for profiling user-defined modules. The library outputs parameter counts alongside computational complexity metrics, helping developers understand model efficiency and inform optimization decisions.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.