PTQRegistry¶
- class paddle.fluid.contrib.slim.quantization.imperative.ptq_registry. PTQRegistry [source]
-
Register the supported layers for PTQ and provide layers info.
-
classmethod
is_supported_layer
(
layer
)
is_supported_layer¶
-
Analyze whether the layer supports quantization. :param layer: The input layer can be a python class or an instance. :type layer: Layer
- Returns
-
Whther the layer is supported.
- Return type
-
flag(bool)
-
classmethod
is_registered_layer
(
layer
)
is_registered_layer¶
-
Analyze whether the layer is register layer_info. :param layer: The input layer can be a python class or an instance. :type layer: Layer
- Returns
-
Wether the layer is register layer_info.
- Return type
-
flag(bool)
-
classmethod
is_simulated_quant_layer
(
layer
)
is_simulated_quant_layer¶
-
Analyze whether the layer is simulated quant layer. :param layer: The input layer can be a python class or an instance. :type layer: Layer
- Returns
-
Whther the layer is supported.
- Return type
-
flag(bool)
-
classmethod
layer_info
(
layer
)
layer_info¶
-
Get the infomation for the layer. :param layer: The input layer can be a python class or an instance. :type layer: Layer
- Returns
-
The layer info of the input layer.
- Return type
-
layer_info(LayerInfo)
-
classmethod
is_supported_layer
(
layer
)