- 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:
(2) If [object Object] is available and [object Object] is 1:
[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:
[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).
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.
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]
- 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
- 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].
The following example is for reference only. For details, see .