Welcome to our Support Center

QLinearAdd

Description

Performs element-wise binary addition on 8 bit data types (with Numpy-style broadcasting support).
C = (A_scale * (A – A_zero_point) + B_scale * (B – B_zero_point))/C_scale + C_zero_point

 

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.

 A (heterogeneous) – T : object, first operand.
A_scale (heterogeneous) – tensor(float) : object, input A’s scale. It’s a scalar, which means a per-tensor/layer quantization.
A_zero_point (optional, heterogeneous) – T : object, input A zero point. Default value is 0 if it’s not specified. It’s a scalar, which means a per-tensor/layer quantization.
B (heterogeneous) – T : object, second operand.
B_scale (heterogeneous) – tensor(float) : object, input B’s scale. It’s a scalar, which means a per-tensor/layer quantization.
B_zero_point (optional, heterogeneous) – T : object, input B zero point. Default value is 0 if it’s not specified. It’s a scalar, which means a per-tensor/layer quantization.
C_scale (heterogeneous) – tensor(float) : object, output scale. It’s a scalar, which means a per-tensor/layer quantization.
C_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,

 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

 

 C (heterogeneous) – T : object, result, has same element type as two inputs.

Type Constraints

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