How to calculate gflops in pytorch

How to analyze the calculation amount of the model and Gflops in pytorch?