[object Object]

[object Object][object Object]undefined
[object Object]
  • Function: Selects elements from the input tensor (self) as the output based on the values in a Boolean mask tensor to form a new one-dimensional tensor.

  • Formulas:

out=[self[i]]iI,where I={imask[i]=True}out = \left[ self[i] \right]_{i \in \mathcal{I}}, \quad \text{where } \mathcal{I} = \left\{ i \mid mask[i] = \text{True} \right\} [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]
    • [object Object]Atlas inference products[object Object] and [object Object]Atlas training products[object Object]: The data type cannot be BFLOAT16.
    • Ascend 950PR/Ascend 950DT: The self and out data types support BFLOAT16, FLOAT16, FLOAT32, DOUBLE, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64 and BOOL.
  • 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 computation

    • [object Object] defaults to deterministic implementation.
  • The function is supported in the broadcast scenario, but the performance is not guaranteed. In the broadcast scenario, the BroadcastTo operator is inserted to solve the problem.

[object Object]

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

[object Object]