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

#include <array_ops.h>

แผ่นรองเทนเซอร์

สรุป

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

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

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

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

# 't' is [[1, 1], [2, 2]]
# 'paddings' is [[1, 1], [2, 2]]
# 'constant_values' is 0
# 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 : เทนเซอร์เอาท์พุต

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

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

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

operation
output

งานสาธารณะ

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

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

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

Operation operation

เอาท์พุท

::tensorflow::Output output

งานสาธารณะ

แพดV2

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

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const