Solved by ptrblck in post #2 
              
              
                Your code looks generally fine for profiling the CPU. 
The inference speed might not linearly depend on the number of parameters. 
E.g. convolution layers have very few parameters (just the kernels, which are often small and the bias which is also usually small), while the actual operation might be …