[object Object]

[object Object][object Object]undefined
[object Object]
  • This API is used to perform the backward computation of GroupedBiasAdd. The extended API of this API is .

  • Formula:[object Object] (1) If [object Object] is available:

    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}

    gradY has two dimensions. H indicates the size of the last dimension of gradY, and G indicates the size of the 0th dimension of groupIdxOptional, that is, groupIdxOptional has G numbers. groupIdxOptional(j) indicates the size of the jth number. After the computation, out is a 2D tensor with shape (G, H).[object Object] (2) If [object Object] is unavailable:

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

    gradY has three dimensions. G, C, and H indicate the sizes of the 0th to 2nd dimensions of gradY, respectively. After computation, out is two-dimensional with shape (G, H).

  • Example:

[object Object][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 data is sorted in ascending order and the last value is equal to the size of dimension 0 of [object Object].
    • If [object Object] is available, ensure that the tensor values are not greater than the maximum INT32 value and are not negative numbers.
[object Object]

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

[object Object]