เทนเซอร์โฟลว์:: ปฏิบัติการ:: จริง

#include <math_ops.h>

ส่งกลับส่วนจริงของจำนวนเชิงซ้อน

สรุป

เมื่อพิจารณา input เทนเซอร์ของจำนวนเชิงซ้อน การดำเนินการนี้จะส่งคืนเทนเซอร์ประเภท float ซึ่งเป็นส่วนจริงของแต่ละองค์ประกอบใน input องค์ประกอบ ทั้งหมด ใน input ต้องเป็นตัวเลขเชิงซ้อนในรูปแบบ \(a + bj\)โดยที่ a คือส่วนจริงที่ส่งคืนโดยการดำเนินการนี้ และ b คือส่วนจินตภาพ

ตัวอย่างเช่น:

# tensor 'input' is [-2.25 + 4.75j, 3.25 + 5.75j]
tf.real(input) ==> [-2.25, 3.25]

ข้อโต้แย้ง:

ผลตอบแทน:

  • Output : เทนเซอร์เอาท์พุต

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

Real (const :: tensorflow::Scope & scope, :: tensorflow::Input input)
Real (const :: tensorflow::Scope & scope, :: tensorflow::Input input, const Real::Attrs & attrs)

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

operation
output

งานสาธารณะ

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

ฟังก์ชันคงที่สาธารณะ

Tout (DataType x)

โครงสร้าง

เทนเซอร์โฟลว์ :: ops :: จริง :: Attrs

ตัวตั้งค่าคุณลักษณะเพิ่มเติมสำหรับ Real

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

การดำเนินการ

Operation operation

เอาท์พุท

::tensorflow::Output output

งานสาธารณะ

จริง

 Real(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input
)

จริง

 Real(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  const Real::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::tensorflow::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::tensorflow::เอาต์พุต

 operator::tensorflow::Output() const 

ฟังก์ชันคงที่สาธารณะ

โน้มน้าว

Attrs Tout(
  DataType x
)