ResourceUtilization

Object to configure resources to use when searching for a configuration for the optimized model (such as in mixed-precision, pruning, etc.):

class model_compression_toolkit.core.ResourceUtilization(weights_memory=np.inf, activation_memory=np.inf, total_memory=np.inf, bops=np.inf)

Class to represent measurements of performance.

Parameters:
  • weights_memory – Memory of a model’s weights in bytes. Note that this includes only coefficients that should be quantized (for example, the kernel of Conv2D in Keras will be affected by this value, while the bias will not).

  • activation_memory – Memory of a model’s activation in bytes, according to the given activation resource utilization metric.

  • total_memory – The sum of model’s activation and weights memory in bytes, according to the given total resource utilization metric.

  • bops – The total bit-operations in the model.