Welcome to our Support Center

QLinearReduceMean

Description

Computes the mean of the low-precision input tensor’s element along the provided axes. The resulting tensor has the same rank as the input if keepdims equal 1. If keepdims equal 0, then the resulting tensor have the reduced dimension pruned. The above behavior is similar to numpy, with the exception that numpy default keepdims to False instead of True. Input and Output scales and zero points are used to requantize the output in a new range. This helps to improve accuracy as after ReduceMean operation the range of the output is expected to decrease. "Output = Dequantize(Input) -> ReduceMean on fp32 data -> Quantize(output)"

 

 

Input parameters

 

specified_outputs_namearray, this parameter lets you manually assign custom names to the output tensors of a node.

 Graphs in : cluster, ONNX model architecture.

 data (heterogeneous) – T : object, an input tensor.
data_scale (heterogeneous) – tensor(float) : object, input scale. It’s a scalar, which means a per-tensor/layer quantization.
data_zero_point (optional, heterogeneous) – T : object, input zero point. Default value is 0 if it’s not specified. It’s a scalar, which means a per-tensor/layer quantization.
reduced_scale (heterogeneous) – tensor(float) : object, output scale. It’s a scalar, which means a per-tensor/layer quantization.
reduced_zero_point (optional, heterogeneous) – T : object, output zero point. Default value is 0 if it’s not specified. It’s a scalar, which means a per-tensor/layer quantization.

 Parameters : cluster,

axes : array, a list of integers, along which to reduce. The default is to reduce over all the dimensions of the input tensor.
Default value “empty”.
keepdims : boolean, keep the reduced dimension or not, default 1 mean keep reduced dimension.
Default value “False”.
 training? : boolean, whether the layer is in training mode (can store data for backward).
Default value “True”.
 lda coeff : float, defines the coefficient by which the loss derivative will be multiplied before being sent to the previous layer (since during the backward run we go backwards).
Default value “1”.

 name (optional) : string, name of the node.

Output parameters

 

reduced (heterogeneous) – T : object, reduced output tensor.

Type Constraints

T in (tensor(uint8)tensor(int8)) : Constrain input types to 8 bit signed and unsigned tensors.

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).
Table of Contents