tensorflow:: ops:: Sign

``` #include <math_ops.h> ```

Returns an element-wise indication of the sign of a number.

Summary

``` y = sign(x) = -1 ``` if ``` x < 0 ``` ; 0 if ``` x == 0 ``` ; 1 if ``` x > 0 ``` .

For complex numbers, ``` y = sign(x) = x / |x| ``` if ``` x != 0 ``` , otherwise ``` y = 0 ``` .

Example usage: tf.math.sign([0., 2., -3.])

Args:

Returns:

• ``` Output ``` : The y tensor.

Constructors and Destructors

``` Sign (const :: tensorflow::Scope & scope, :: tensorflow::Input x) ```

Public attributes

``` operation ```
``` Operation ```
``` y ```
``` :: tensorflow::Output ```

Public functions

``` node () const ```
``` ::tensorflow::Node * ```
``` operator::tensorflow::Input () const ```
``` ```
``` operator::tensorflow::Output () const ```
``` ```

Public attributes

operation

`Operation operation`

y

`::tensorflow::Output y`

Public functions

Sign

``` Sign(
const ::tensorflow::Scope & scope,
::tensorflow::Input x
)```

node

`::tensorflow::Node * node() const `

operator::tensorflow::Input

` operator::tensorflow::Input() const `

operator::tensorflow::Output

` operator::tensorflow::Output() const `
[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]