In this recipe, you will learn how to compute the total number of floating point operations in a network performed in forward pass, as well as the amount of memory consumed. This is useful when you want to understand the limitations of your model and reveal where exactly the bottlenecks are so that you can optimize it.
Measuring inference time and contributions to it from each layer
Getting ready
Before you proceed with this recipe, you need to install OpenCV 3.x with Python API support.
How to do it...
You need to perform the following steps:
- Import the modules:
import...