neural_compressor.tensorflow.keras.layers.pool2d
Initialize custom pool2d layers for Keras quantization.
Classes
The custom quantized AveragePooling2D layer. |
|
The custom quantized MaxPooling2D layer. |
Functions
|
Initialize int8 avgpool. |
|
Initialize int8 maxpool. |
Module Contents
- class neural_compressor.tensorflow.keras.layers.pool2d.QAvgPool2D(name, pool_size=(2, 2), strides=None, padding='valid', data_format=None, act_min_value=None, act_max_value=None, weight_min_value=None, weight_max_value=None, granularity='per_tensor', quant_status='calib', quant_mode='SCALED', quant_T='s8', quant_round_mode='HALF_AWAY_FROM_ZERO', quant_narrow_range=False, quant_axis=None, **kwargs)[source]
The custom quantized AveragePooling2D layer.
- class neural_compressor.tensorflow.keras.layers.pool2d.QMaxPool2D(name, pool_size=(2, 2), strides=None, padding='valid', data_format=None, act_min_value=None, act_max_value=None, weight_min_value=None, weight_max_value=None, granularity='per_tensor', quant_status='calib', quant_mode='SCALED', quant_T='s8', quant_round_mode='HALF_AWAY_FROM_ZERO', quant_narrow_range=False, quant_axis=None, **kwargs)[source]
The custom quantized MaxPooling2D layer.