tensorflow:: ops:: Sign

#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.])

ข้อโต้แย้ง:

การส่งคืนสินค้า:

  • Output : เทนเซอร์ y

ตัวสร้างและตัวทำลาย

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

คุณลักษณะสาธารณะ

operation
y

หน้าที่สาธารณะ

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 

ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต

 operator::tensorflow::Output() const