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:
- scope: A Scope object
Returns:
Output
: The y tensor.
Constructors and Destructors |
|
---|---|
Sign(const ::tensorflow::Scope & scope, ::tensorflow::Input x)
|
Public attributes |
|
---|---|
operation
|
|
y
|
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