GFLOPs, Throughput
Closed this issue · 5 comments
Hi author.
Could you provide me with the code for calculating GFLOPs and throughput?
I calculate the GFLOPs manually. While the MACs of the resnet18 backbone can be reffered to PyTorch-OpCounter, the FLOPs of 1D CNN, LSTM, classifier and others are mannually computed. As for throughput, you could perform inference with batch size of 1, and the process will report the whole time of processing the Dev or Test set, and thus you could calculate the throughput according to the number of videos in the Dev or Test set.
Thanks!
Sorry, I have one more question.
As I understand, to calculate Gflop, we base on the input. But in this work, input is different for each batch. So how to calculate Gflop?
We calculat the averaged FLOPs per frame, and assume each video has 100 frames to show the results. E.g., the FLOPs per frame is 3.64G, we give 364G as the FLOPs for comparison for the video.
I got it. Thank you!