เทนเซอร์โฟลว์:: ออปส์:: แพดวี2

#include <array_ops.h>

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

สรุป

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

หน้าที่สาธารณะ

แพดวี2

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

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต

 operator::tensorflow::Output() const