Method Sign
Sign(TensorFloat)
Performs an element-wise Sign math operation: f(x) = 1 if x > 0. f(x) = -1 if x < 0. Otherwise f(x) = 0.
Declaration
public TensorFloat Sign(TensorFloat X)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorFloat | X | The input tensor. |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Sign(TensorInt)
Performs an element-wise Sign math operation: f(x) = 1 if x > 0. f(x) = -1 if x < 0. Otherwise f(x) = 0.
Declaration
public TensorInt Sign(TensorInt X)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorInt | X | The input tensor. |
Returns
| Type | Description |
|---|---|
| TensorInt | The computed output tensor. |