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

#include <array_ops.h>

รวบรวมรายการเทนเซอร์ระดับ N R ไว้ในเทนเซอร์ระดับเดียว (R+1)

สรุป

บรรจุเทนเซอร์ N ใน values ลงในเทนเซอร์ที่มีอันดับสูงกว่าเทนเซอร์แต่ละตัวใน values 1 อันดับ โดยบรรจุไว้ตามขนาด axis ให้รายการเทนเซอร์ของรูปร่าง (A, B, C) ;

ถ้า axis == 0 เทนเซอร์ output จะมีรูปร่าง (N, A, B, C) ถ้า axis == 1 เทนเซอร์ output จะมีรูปร่าง (A, N, B, C) ฯลฯ

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

# 'x' is [1, 4]
# 'y' is [2, 5]
# 'z' is [3, 6]
pack([x, y, z]) => [[1, 4], [2, 5], [3, 6]]  # Pack along first dim.
pack([x, y, z], axis=1) => [[1, 2, 3], [4, 5, 6]]

สิ่งนี้ตรงกันข้ามกับ unpack

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • ค่า: ต้องมีรูปร่างและประเภทเดียวกัน

แอ็ตทริบิวต์ทางเลือก (ดู Attrs ):

  • แกน: มิติตามที่จะแพ็ค ค่าลบจะล้อมรอบ ดังนั้นช่วงที่ถูกต้องคือ [-(R+1), R+1)

ผลตอบแทน:

  • Output : เทนเซอร์ที่อัดแน่น

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

Stack (const :: tensorflow::Scope & scope, :: tensorflow::InputList values)
Stack (const :: tensorflow::Scope & scope, :: tensorflow::InputList values, const Stack::Attrs & attrs)

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

operation
output

งานสาธารณะ

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

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

Axis (int64 x)

โครงสร้าง

เทนเซอร์โฟลว์ :: ops :: สแต็ค :: Attrs

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

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

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

Operation operation

เอาท์พุท

::tensorflow::Output output

งานสาธารณะ

ซ้อนกัน

 Stack(
  const ::tensorflow::Scope & scope,
  ::tensorflow::InputList values
)

ซ้อนกัน

 Stack(
  const ::tensorflow::Scope & scope,
  ::tensorflow::InputList values,
  const Stack::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

แกน

Attrs Axis(
  int64 x
)