เทนเซอร์โฟลว์:: ปฏิบัติการ:: ปรับขนาดเพื่อนบ้านที่ใกล้ที่สุด

#include <image_ops.h>

ปรับขนาด images ให้ size โดยใช้การแก้ไขเพื่อนบ้านที่ใกล้ที่สุด

สรุป

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • ภาพ: 4-D พร้อมรูปทรง [batch, height, width, channels] .
  • ขนาด: = A 1-D int32 เทนเซอร์ ของ 2 องค์ประกอบ: new_height, new_width ขนาดใหม่สำหรับภาพ

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

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

ผลตอบแทน:

  • Output : 4-D ที่มีรูปร่าง [batch, new_height, new_width, channels]

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

ResizeNearestNeighbor (const :: tensorflow::Scope & scope, :: tensorflow::Input images, :: tensorflow::Input size)
ResizeNearestNeighbor (const :: tensorflow::Scope & scope, :: tensorflow::Input images, :: tensorflow::Input size, const ResizeNearestNeighbor::Attrs & attrs)

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

operation
resized_images

งานสาธารณะ

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

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

AlignCorners (bool x)
HalfPixelCenters (bool x)

โครงสร้าง

tensorflow :: ops :: ปรับขนาด NearestNeighbor :: Attrs

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

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

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

Operation operation

ปรับขนาด_รูปภาพ

::tensorflow::Output resized_images

งานสาธารณะ

ปรับขนาดเพื่อนบ้านที่ใกล้ที่สุด

 ResizeNearestNeighbor(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images,
  ::tensorflow::Input size
)

ปรับขนาดเพื่อนบ้านที่ใกล้ที่สุด

 ResizeNearestNeighbor(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images,
  ::tensorflow::Input size,
  const ResizeNearestNeighbor::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

จัดตำแหน่งมุม

Attrs AlignCorners(
  bool x
)

ฮาล์ฟพิกเซลเซ็นเตอร์

Attrs HalfPixelCenters(
  bool x
)