Solved by James_Reed in post #2 
              
              
                Hi @Stonepia, 
Thanks for the question! 
First, I’d like to understand better what you intend to do here. Are you trying to calculate a quantity like FLOPs for the network? One way to do this is with the profiler: Automatic differentiation package - torch.autograd — PyTorch 1.8.0 documentation. It s…