[object Object][object Object][object Object]undefined
[object Object]
  • Function: Calculates the result of the input scale and bias.

  • Formula:

    If [object Object] is not input:

    y=xscaley=x*scale

    If [object Object] is input:

    y=xscale+biasy=x*scale + bias

    Note: [object Object] and [object Object] support broadcasting with X. The shape rules of [object Object] and [object Object] are as follows:

    • When scaleFromBlob is True (axis is converted to a positive number, and numAxes is -1, indicating the last axis):

      scaleShape is xShape[axis:axis + numAxes].

      biasShape is xShape[axis:axis + numAxes].

    • When scaleFromBlob is False (axis is converted to a positive number, and numAxes is -1, indicating that the first axis is reached):

      scaleShape is xShape[axis:axis + rank(scaleShape)].

      biasShape is xShape[axis:axis + rank(scaleShape)].

    • Examples:

      • scaleFromBlob = True:

        xShape = [a, b, c, d, e, f] axis = 3 numAxes = 2 --> scaleShape = [d, e]

        xShape = [a, b, c, d, e, f] axis = 3 numAxes = 3 --> scaleShape = [d, e, f]

        xShape = [a, b, c, d, e, f] axis = 3 numAxes = -1 --> scaleShape = [d, e, f]

      • scaleFromBlob = False:

        xShape = [a, b, c, d, e, f] axis = 3 rank(scaleShape) = 2 --> scaleShape = [d, e]

        xShape = [a, b, c, d, e, f] axis = 3 rank(scaleShape) = 3 --> scaleShape = [d, e, f]

        xShape = [a, b, c, d, e, f] axis = 3 rank(scaleShape) = 1 --> scaleShape = [d]

[object Object]

Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters:

    [object Object]
  • Returns:

    [object Object]: status code. For details, see .

    The first-phase API implements input parameter verification. The following errors may be thrown.

    [object Object]
[object Object]
  • Parameters:

    [object Object]
  • Returns:

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic compute:
    • [object Object] defaults to a deterministic implementation.
[object Object]

The following example is for reference only. For details, see .

[object Object]