Closed noamgot closed 2 years ago
set_op_handle
https://detectron2.readthedocs.io/en/latest/modules/fvcore.html#fvcore.nn.ActivationCountAnalysis.set_op_handle to overwrite the behavior. And check the handles in source code to see how to implement a handle.I'll have a look, thanks!
Hello I stumbled upon this package as I'm looking for a way to count FLOPs/MACs in my model. I compared the results that I got to another popular package (
thop
) and noticed thatfvcore
does not count the bias term as part of the FLOPs count. I wrote a small example to demonstrate this using a convolutional layer (I'm running on Linux CPU, with the latest version of fvcore and pytorch v1.9.1); notice the difference when we setbias=True
and how the results are identical whenbias=False
:It outputs:
My questions:
Thanks