Lyken17/pytorch-OpCounter
A PyTorch library that counts MACs and FLOPs to measure the computational complexity of deep learning models.

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.