Description: Computes the backpropagation of
[object Object].Formula:
(1) When
[object Object]is not set to[object Object]:- When
[object Object]is set to[object Object]:
- When
[object Object]is set to[object Object]:
(2) When
[object Object]is set to[object Object]:[object Object]indicates the size of the first dimension of[object Object].- When
[object Object]is set to[object Object], each expert can process a fixed number of tokens, which is specified by[object Object]. The first dimension of the input[object Object]is the value specified by[object Object], which indicates the number of experts. The 0th dimension of the input[object Object]is[object Object]*[object Object]. The value of[object Object]can be computed based on the two dimensions. - When
[object Object]is set to[object Object], each token is processed by a fixed number of experts, which is specified by[object Object]. The 0th dimension of the input[object Object]is specified by[object Object], which indicates the number of tokens. The 0th dimension of the input[object Object]is the value specified by[object Object]*[object Object]. The value of[object Object]can be computed based on the two dimensions.
- When
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor covering 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 implements input parameter verification. The following errors may be thrown.
[object Object]
Deterministic computation:
[object Object]defaults to deterministic implementation.
When the input
[object Object]is not left empty and[object Object]is set to[object Object], the value of[object Object]is less than or equal to that of[object Object], and the value is less than or equal to[object Object].When the input
[object Object]is not left empty and[object Object]is set to[object Object], the value of[object Object]is less than or equal to that of[object Object].
The following example is for reference only. For details, see .