Calculating the Number of flops for a given Neural Network?
many papers using their own flops counting code.
it is made by entering the input size of certain operation's tensor.
so they manually calculate it's flops
you can find it with keyword like 'flops constraint' or 'flops counter' in github.
or there are 'torchstat' tool which counts the flops and memory usage etc.
I have a neural network(ALEXnet or VGG16) written with Keras for Image Classification and I would like to calculate the Number of floating point operations for a network. The size of the images in the dataset could varry.
Can a generlized code be written in python which could calculate flops automatically ? or is there any libraray avaialble.
I am working with spyderAnaconda and the defined network is a sequential model.
Thank you.