Floating-point operation count, commonly written as FLOPs, measures the numerical operations required by a computation. It serves as a scalability metric alongside memory usage, time per epoch, and convergence speed. section 7.2.3
Profiling a model
Use THOP to profile a PyTorch model with a representative input, then inspect the reported operation count alongside other resource measurements. section 7.2.3
from thop import profile #1
input = torch.randn(1, 3, 224, 224)
macs, params = profile(model, inputs=(input, ))
print(f"FLOPs: {macs}")
A compact THOP example creates an input tensor, profiles the model, and prints the returned operation count. section 7.2.3

