Calculate the amount of FLOPs

Is there a way to calculate the amount of FLOPs of a cnn ,by passing one input image. I can do it by hand, but my error range can be pretty big, and it’s a pain in the a**.

Have any Idea?!

Thanks!