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

#include <math_ops.h>

แปลงจำนวนจริงสองตัวให้เป็นจำนวนเชิงซ้อน

สรุป

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

เทนเซอร์อินพุต real และ imag ต้องมีรูปร่างเหมือนกัน

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

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

ข้อโต้แย้ง:

ผลตอบแทน:

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

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

Complex (const :: tensorflow::Scope & scope, :: tensorflow::Input real, :: tensorflow::Input imag)
Complex (const :: tensorflow::Scope & scope, :: tensorflow::Input real, :: tensorflow::Input imag, const Complex::Attrs & attrs)

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

operation
out

งานสาธารณะ

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

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

Tout (DataType x)

โครงสร้าง

เทนเซอร์โฟลว์ :: ops :: ซับซ้อน :: Attrs

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

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

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

Operation operation

ออก

::tensorflow::Output out

งานสาธารณะ

ซับซ้อน

 Complex(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input real,
  ::tensorflow::Input imag
)

ซับซ้อน

 Complex(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input real,
  ::tensorflow::Input imag,
  const Complex::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

โน้มน้าว

Attrs Tout(
  DataType x
)