StopGradient
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: passes the input tensor to the output as is, and prevents the backpropagation computation from passing through this node.
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| x | Input | Input tensor. | ALL | ND |
| y | Output | Tensor that has the same shape, data type, and content as the input x. |
Same as x |
ND |
Constraint Description
- The shape and data type of
xandyare the same. - This operator does not perform numerical transformation, and only changes the gradient propagation behavior.
Invocation Description
| Invocation Method | Invocation Sample | Description |
|---|---|---|
| Graph-mode invocation | test_geir_stop_gradient | Invokes the StopGradient operator by building a graph through the operator IR. |