we could build a script / utility for this. The best method would be to count operations of traces.
There are now scripts that can take a network output and visualize the network. Stuff like https://gist.github.com/apaszke/f93a377244be9bfcb96d3547b9bc424d 182
https://github.com/e-lab/pytorch-toolbox/tree/master/model_graph 131
Taking them and modifying them to loop over ops and doing a total count of ops (based on the autograd Function name + size of inputs) is probably the best way of going about this.
One such utility script written for lua-torch has the “ops per Function” in this file: https://github.com/e-lab/Torch7-profiling/blob/master/src/profiler.lua 73