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

#include <array_ops.h>

แพดเทนเซอร์ด้วยศูนย์

สรุป

การดำเนินการนี้จะแพด input ด้วยศูนย์ตามการ paddings คุณระบุ paddings เป็นเทนเซอร์จำนวนเต็มที่มีรูปร่าง [Dn, 2] โดยที่ n คืออันดับของ input สำหรับแต่ละมิติ D ของ input paddings[D, 0] ระบุจำนวนศูนย์ที่จะเพิ่มก่อนเนื้อหาของ input ในมิตินั้น และ paddings[D, 1] ระบุจำนวนศูนย์ที่จะเพิ่มหลังเนื้อหาของ input ในมิตินั้น

ขนาดเบาะของแต่ละมิติ D ของเอาต์พุตคือ:

paddings(D, 0) + input.dim_size(D) + paddings(D, 1)

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

# 't' is [[1, 1], [2, 2]]
# 'paddings' is [[1, 1], [2, 2]]
# rank of 't' is 2
pad(t, paddings) ==> [[0, 0, 0, 0, 0, 0]
                      [0, 0, 1, 1, 0, 0]
                      [0, 0, 2, 2, 0, 0]
                      [0, 0, 0, 0, 0, 0]]

ข้อโต้แย้ง:

ผลตอบแทน:

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

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

Pad (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input paddings)

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

operation
output

งานสาธารณะ

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

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

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

Operation operation

เอาท์พุท

::tensorflow::Output output

งานสาธารณะ

เบาะ

 Pad(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input paddings
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const