tensorflow:: אופס:: סִימָן
#include <math_ops.h>
מחזירה אינדיקציה מבחינה אלמנטית של הסימן של מספר.
תַקצִיר
y = sign(x) = -1
אם x < 0
; 0 אם x == 0
; 1 אם x > 0
.
עבור מספרים מרוכבים, y = sign(x) = x / |x|
אם x != 0
, אחרת y = 0
.
שימוש לדוגמה: tf.math.sign([0., 2., -3.])
טיעונים:
- scope: אובייקט Scope
החזרות:
-
Output
: הטנסור y.
בנאים והורסים | |
---|---|
Sign (const :: tensorflow::Scope & scope, :: tensorflow::Input x) |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
תכונות ציבוריות
מִבצָע
Operation operation
y
::tensorflow::Output y
תפקידים ציבוריים
סִימָן
Sign(
const ::tensorflow::Scope & scope,
::tensorflow::Input x
)
צוֹמֶת
::tensorflow::Node * node() const
מפעיל::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const