torchscope
torchscope copied to clipboard
Model Scope in PyTorch (include Params, FLOPs, Madds).
As a lazy coder ,your code help me to save time and i also can learn many novel ways。
Current impl based on forward hook only captures operations in the model that have been placed in Modules. If functional ops are used, they are missed. I believe a solution...
I think FLOPs ≈ 2 * MAdds as general each MAdd contains one multiplication and one addition, but the result of your code is not like this.