Here's an implementation of how to obtain the per-module information from the jit trace. The class in fvcore/nn/jit_analysis.py can return per-module and per-operator information for generic calculation handles acting on operators in the model's trace graph.
The trace calculation and analysis step has been moved from fvcore/nn/jit_handles.py to fvcore/nn/jit_analysis.py. Functions to construct specific counters for flops and activations are defined in fvcore/nn/flop_count.py and fvcore/nn/activation_count.py.
Here's an implementation of how to obtain the per-module information from the jit trace. The class in
fvcore/nn/jit_analysis.py
can return per-module and per-operator information for generic calculation handles acting on operators in the model's trace graph.The trace calculation and analysis step has been moved from
fvcore/nn/jit_handles.py
tofvcore/nn/jit_analysis.py
. Functions to construct specific counters for flops and activations are defined infvcore/nn/flop_count.py
andfvcore/nn/activation_count.py
.