ZerosLike
English | 简体中文
Product Support Status
| Product | Supported |
|---|---|
| Ascend 950PR&950DT products | √ |
| Atlas A3 products | √ |
| Atlas A2 products | √ |
| Atlas 200I/500 A2 inference products | × |
| Atlas inference products | √ |
| Atlas training products | √ |
Function Description
- Operator function: fills the selfRef tensor with all zeros.
-
Computation formula:
selfRefi=0{selfRef}_{i} = 0
-
Example:
Input selfRef: tensor([[1, 2], [3, 4]]) Output selfRef: tensor([[0, 0], [0, 0]])
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| x | Input | Input parameter for the zeroslike computation, which is selfRef in the formula. | FLOAT, FLOAT16, BFLOAT16, INT8, INT32, INT64, UINT8, BOOL | ND |
| y | Output | Output parameter for the zeroslike computation, which fills the selfRef tensor with all 0s. | FLOAT, FLOAT16, BFLOAT16, INT8, INT32, INT64, UINT8, BOOL | ND |
Invocation Description
| Invocation Method | Invocation Sample | Description |
|---|---|---|
| aclnn invocation | test_aclnn_inplace_zero | Invokes the ZerosLike operator through the aclnnInplaceZero API. |