Welcome to our Support Center

QLinearGlobalAveragePool

Description

QLinearGlobalAveragePool consumes an input tensor X and applies Average pooling across the values in the same channel. This is equivalent to AveragePool with kernel size equal to the spatial dimension of input tensor. Input is of type uint8_t or int8_t.

 

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.

 X (heterogeneous) – T : object, input data tensor from the previous operator; According to channels_last, dimensions for image case are (N x C x H x W), or (N x H x W x C) where N is the batch size, C is the number of channels, and H and W are the height and the width of the data. For non image case, the dimensions are in the form of (N x C x D1 x D2 … Dn), or (N x D1 X D2 … Dn x C) where N is the batch size.
x_scale (heterogeneous) – tensor(float) : object, scale of quantized input ‘X’. It must be a scalar.
x_zero_point (heterogeneous) – T : object, zero point tensor for input ‘X’. It must be a scalar.
y_scale (heterogeneous) – tensor(float) : object, scale of quantized output ‘Y’. It must be a scalar.
y_zero_point (heterogeneous) – T : object, zero point tensor for output ‘Y’. It must be a scalar.

 Parameters : cluster,

channels_last : boolean, works on NHWC layout or not ?
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

 

 Y (heterogeneous) – T : object, output data tensor from pooling across the input tensor. The output tensor has the same rank as the input. with the N and C value keep it value, while the otherdimensions are all 1.

Type Constraints

T in (tensor(uint8), tensor(int8)) : Constrain input and output types to signed/unsigned int8 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