[object Object][object Object][object Object]undefined
[object Object]
  • This API is used to implement the backward computation of groupBiasAdd. This API is an extension of , with the [object Object] attribute added and the [object Object] type specified.
  • Formula:[object Object] (1) If [object Object] is available and [object Object] is 0:
out(G,H)={i=groupIdxOptional(j1)groupIdxOptional(j)gradY(i,H),1jG1i=0groupIdxOptional(j)gradY(i,H),j=0out(G,H) = \begin{cases} \sum_{i=groupIdxOptional(j-1)}^{groupIdxOptional(j)} gradY(i, H), & 1 \leq j \leq G-1 \\ \sum_{i=0}^{groupIdxOptional(j)} gradY(i, H), & j = 0 \end{cases}

   (2) If [object Object] is available and [object Object] is 1:

groupIdx(i)=i=0jgroupIdxOptional(j),j=0...GgroupIdx(i) = \sum_{i=0}^{j} groupIdxOptional(j), j=0...G out(G,H)={i=groupIdx(j1)groupIdx(j)gradY(i,H),1jG1i=0groupIdx(j)gradY(i,H),j=0out(G,H) = \begin {cases} \sum_{i=groupIdx(j-1)}^{groupIdx(j)} gradY(i,H), & 1 \leq j \leq G-1 \\ \sum_{i=0}^{groupIdx(j)} gradY(i, H), & j=0 \end {cases}

  [object Object] has two dimensions, [object Object] indicates the size of the last dimension of [object Object], while [object Object] indicates the size of dimension 0 of [object Object]. That is, [object Object] has [object Object] numbers, and [object Object] indicates the size of the jth dimension. After computation, [object Object] is 2-dimensional, with the shape (G, H).[object Object]   (3) If [object Object] is unavailable:

out(G,H)=i=0CgradY(G,i,H)out(G, H) = \sum_{i=0}^{C} gradY(G, i, H)

  [object Object] has three dimensions. [object Object], [object Object], and [object Object] indicate the sizes of dimensions 0 to 2 of [object Object]. After computation, [object Object] is 2-dimensional, with the shape (G, H).

  • Example:[object Object] (1) If [object Object] is available and [object Object] is 0:[object Object] The shape of [object Object] is (1000, 30), and the shape of [object Object] is (400, 600, 1000). [object Object] is divided into three groups, and the accumulated number of rows in each group is 400, 200, and 400 respectively. After computation, the shape of [object Object] is (3, 30).[object Object] (2) If [object Object] is available and [object Object] is 1:[object Object] The shape of [object Object] is (1000, 30), and the shape of [object Object] is (400, 210, 390). [object Object] is divided into three groups, and the accumulated number of rows in each group is 400, 210, and 390 respectively. After computation, the shape of [object Object] is (3, 30).[object Object] (3) If [object Object] is unavailable:[object Object] The shape of [object Object] is (10, 100, 30). [object Object] is divided into 10 groups. The accumulated number of rows in each group is 100. After computation, the shape of [object Object] is (10, 30).
[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 performs input parameter validation. The following error codes may be returned:

    [object Object]
[object Object]
  • Parameters:

    [object Object]
  • Returns:

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

[object Object]
  • Deterministic computing:
    • [object Object] defaults to a deterministic implementation.
    • [object Object] supports a maximum of 2048 numbers.
    • If [object Object] is available, ensure that the tensor values are not greater than the maximum INT32 value and are not negative numbers.
  • If [object Object] is available and [object Object] is [object Object], ensure that the tensor values are sorted in ascending order and the last value is equal to the size of the 0th dimension of [object Object].
  • If [object Object] is available and [object Object] is 1, ensure that the sum of tensor values is equal to the size of the 0th dimension of [object Object].
[object Object]

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

[object Object]