tensorflow::ops::FusedResizeAndPadConv2D

#include <nn_ops.h>

ทำการปรับขนาดและเพิ่มขอบเป็นขั้นตอนเตรียมการก่อนการคำนวณแบบคอนโวลูชัน

สรุป

โดยทั่วไปแล้ว การแปลงเชิงพื้นที่สามารถทำได้อย่างมีประสิทธิภาพมากขึ้นในขั้นตอนการแพ็คของคอนโวลูชัน ดังนั้นตัวดำเนินการนี้จึงอนุญาตให้มีการใช้งานที่เหมาะสมที่สุดโดยการรวมขั้นตอนเหล่านี้เข้าด้วยกัน ซึ่งจะช่วยป้องกันความจำเป็นในการเขียนผลลัพธ์ระดับกลางออกมาเป็นเทนเซอร์ทั้งหมด ลดภาระหน่วยความจำ และเราสามารถได้ประโยชน์จากความหน่วงแฝงโดยการรวมการคำนวณการแปลงเข้าด้วยกัน คุณสมบัติ data_format สำหรับ Conv2D ไม่ได้รับการสนับสนุนโดยตัวดำเนินการนี้ และค่าเริ่มต้นจะเป็นลำดับ 'NHWC' ภายใน ตัวดำเนินการนี้ใช้บัฟเฟอร์ชั่วคราวต่อกราฟเพียงตัวเดียว ซึ่งหมายความว่าจะเกิดการบล็อกหากมีการเรียกใช้หลายเวอร์ชันพร้อมกัน เนื่องจากตัวดำเนินการนี้เป็นการเพิ่มประสิทธิภาพเพื่อลดการใช้หน่วยความจำเป็นหลัก

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • อินพุต: 4 มิติ ที่มีรูปร่าง [batch, in_height, in_width, in_channels]
  • ขนาด: เทนเซอร์ int32 แบบ 1 มิติ ประกอบด้วย 2 องค์ประกอบ ได้แก่ new_height, new_width ขนาดใหม่ของรูปภาพ
  • ส่วนเติมเต็ม: เมทริกซ์สองคอลัมน์ที่ระบุขนาดของส่วนเติมเต็ม จำนวนแถวต้องเท่ากับอันดับของ input
  • ตัวกรอง: 4 มิติ ที่มีรูปร่าง [filter_height, filter_width, in_channels, out_channels]
  • ระยะก้าว: 1 มิติ ความยาว 4 ระยะก้าวของหน้าต่างเลื่อนสำหรับแต่ละมิติของ input ต้องอยู่ในลำดับเดียวกับมิติที่ระบุไว้ในรูปแบบ
  • การเติมช่องว่าง: ประเภทของอัลกอริทึมการเติมช่องว่างที่จะใช้

คุณลักษณะเสริม (ดูที่ Attrs ):

  • resize_align_corners: หากตั้งค่าเป็น true ระบบจะจัดตำแหน่งกึ่งกลางของพิกเซลทั้ง 4 มุมของเทนเซอร์อินพุตและเอาต์พุตให้ตรงกัน โดยคงค่าที่พิกเซลมุมไว้ ค่าเริ่มต้นคือ false

การส่งคืนสินค้า:

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

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

FusedResizeAndPadConv2D (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input size, :: tensorflow::Input paddings, :: tensorflow::Input filter, StringPiece mode, const gtl::ArraySlice< int > & strides, StringPiece padding)
FusedResizeAndPadConv2D (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input size, :: tensorflow::Input paddings, :: tensorflow::Input filter, StringPiece mode, const gtl::ArraySlice< int > & strides, StringPiece padding, const FusedResizeAndPadConv2D::Attrs & attrs)

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

operation
output

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

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

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

ResizeAlignCorners (bool x)

โครงสร้าง

tensorflow::ops::FusedResizeAndPadConv2D::Attrs

ตัวเลือกการตั้งค่าแอตทริบิวต์สำหรับ FusedResizeAndPadConv2D

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

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

Operation operation

เอาต์พุต

::tensorflow::Output output

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

FusedResizeAndPadConv2D

 FusedResizeAndPadConv2D(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input size,
  ::tensorflow::Input paddings,
  ::tensorflow::Input filter,
  StringPiece mode,
  const gtl::ArraySlice< int > & strides,
  StringPiece padding
)

FusedResizeAndPadConv2D

 FusedResizeAndPadConv2D(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input size,
  ::tensorflow::Input paddings,
  ::tensorflow::Input filter,
  StringPiece mode,
  const gtl::ArraySlice< int > & strides,
  StringPiece padding,
  const FusedResizeAndPadConv2D::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

ปรับขนาดและจัดตำแหน่งมุม

Attrs ResizeAlignCorners(
  bool x
)