Skip to content

madd

Multiply-add.

This layer performs multiply-add on an input by scale and bias; i.e. .


Parameters

  • has_relu : Boolean, whether the layer applies a ReLU function to the output.
    The default is false.
  • relu_max_value : Number, the max value of ReLU output.
    Valid only when has_relu is true and relu_max_value > 0.0f.
    The default is -1.0f, i.e. there is no max value.

Weights

  • scale : n-D tensor, scale factor.
    The shape must be a scaler (0D tensor), [channels] (1D tensor) or same as the input. The default is 1.0f (0D tensor).
  • bias : n-D tensor, bias.
    The shape must be a scalar (0D tensor), [channels] (1D tensor) or same as the input. The default is 0.0f (0D tensor).