dòng chảy căng:: ôi:: Thay đổi kích thướcHàng xóm gần nhất

#include <image_ops.h>

Thay đổi kích thước images theo size bằng cách sử dụng phép nội suy lân cận gần nhất.

Bản tóm tắt

Tranh luận:

  • phạm vi: Một đối tượng Phạm vi
  • hình ảnh: 4-D với hình dạng [batch, height, width, channels] .
  • size: = Tensor int32 1-D gồm 2 phần tử: new_height, new_width . Kích thước mới cho hình ảnh.

Thuộc tính tùy chọn (xem Attrs ):

  • Align_corners: Nếu đúng, tâm của 4 pixel góc của tensor đầu vào và đầu ra được căn chỉnh, giữ nguyên giá trị ở các pixel góc. Mặc định là sai.

Trả về:

  • Output : 4-D với hình dạng [batch, new_height, new_width, channels] .

Hàm tạo và hàm hủy

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)

Thuộc tính công khai

operation
resized_images

Chức năng công cộng

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

Các hàm tĩnh công khai

AlignCorners (bool x)
HalfPixelCenters (bool x)

Cấu trúc

tensorflow:: ops:: Thay đổi kích thướcGần nhấtHàng xóm:: Attrs

Trình thiết lập thuộc tính tùy chọn cho ResizeNearestNeighbor .

Thuộc tính công khai

hoạt động

Operation operation

đã thay đổi kích thước_hình ảnh

::tensorflow::Output resized_images

Chức năng công cộng

Thay đổi kích thướcHàng xóm gần nhất

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

Thay đổi kích thướcHàng xóm gần nhất

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

nút

::tensorflow::Node * node() const 

toán tử::tenorflow::Đầu vào

 operator::tensorflow::Input() const 

toán tử::tenorflow::Đầu ra

 operator::tensorflow::Output() const 

Các hàm tĩnh công khai

Căn chỉnh các góc

Attrs AlignCorners(
  bool x
)

Trung tâm HalfPixel

Attrs HalfPixelCenters(
  bool x
)