Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
dòng chảy căng:: ôi:: Thay đổi kích thướcSong tuyến
#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 song tuyến tính.
Bản tóm tắt
Hình ảnh đầu vào có thể có nhiều loại khác nhau nhưng hình ảnh đầu ra luôn nổi.
Lập 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]
.
Thuộc tính công khai
Chức năng công cộng
nút
::tensorflow::Node * node() const
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
)
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::ResizeBilinear Class Reference\n\ntensorflow::ops::ResizeBilinear\n===============================\n\n`#include \u003cimage_ops.h\u003e`\n\nResize `images` to `size` using bilinear interpolation.\n\nSummary\n-------\n\n[Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input) images can be of different types but output images are always float.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- images: 4-D with shape `[batch, height, width, channels]`.\n- size: = A 1-D int32 [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of 2 elements: `new_height, new_width`. The new size for the images.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/resize-bilinear/attrs#structtensorflow_1_1ops_1_1_resize_bilinear_1_1_attrs)):\n\n- align_corners: If true, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to false.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 4-D with shape `[batch, new_height, new_width, channels]`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ResizeBilinear](#classtensorflow_1_1ops_1_1_resize_bilinear_1a981aa658a845a625503e7e42c2f0885c)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` images, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size)` ||\n| [ResizeBilinear](#classtensorflow_1_1ops_1_1_resize_bilinear_1ad887a5d2954f777b5528579f4c60589b)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` images, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size, const `[ResizeBilinear::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/resize-bilinear/attrs#structtensorflow_1_1ops_1_1_resize_bilinear_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_resize_bilinear_1ac1253b0351c139e9c4782e0ce62c7aa2) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [resized_images](#classtensorflow_1_1ops_1_1_resize_bilinear_1a6487d7e2a3fd89b0ba594300ddd2e2d7) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_resize_bilinear_1af9816ad8aa06bfbe416f9ada05a5367c)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_resize_bilinear_1a0f822a29ed600eb63bccc395b6540a83)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_resize_bilinear_1aafa3001b38c457833115ce0f523e3751)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|--------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| [AlignCorners](#classtensorflow_1_1ops_1_1_resize_bilinear_1a16fe808dfb000fd2694d1fbe1b706437)`(bool x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/resize-bilinear/attrs#structtensorflow_1_1ops_1_1_resize_bilinear_1_1_attrs) |\n| [HalfPixelCenters](#classtensorflow_1_1ops_1_1_resize_bilinear_1a040b5f7ab939a890ca9d83fddc789f91)`(bool x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/resize-bilinear/attrs#structtensorflow_1_1ops_1_1_resize_bilinear_1_1_attrs) |\n\n| ### Structs ||\n|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ResizeBilinear::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/resize-bilinear/attrs) | Optional attribute setters for [ResizeBilinear](/versions/r2.2/api_docs/cc/class/tensorflow/ops/resize-bilinear#classtensorflow_1_1ops_1_1_resize_bilinear). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### resized_images\n\n```scdoc\n::tensorflow::Output resized_images\n``` \n\nPublic functions\n----------------\n\n### ResizeBilinear\n\n```gdscript\n ResizeBilinear(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input images,\n ::tensorflow::Input size\n)\n``` \n\n### ResizeBilinear\n\n```gdscript\n ResizeBilinear(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input images,\n ::tensorflow::Input size,\n const ResizeBilinear::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### AlignCorners\n\n```text\nAttrs AlignCorners(\n bool x\n)\n``` \n\n### HalfPixelCenters\n\n```text\nAttrs HalfPixelCenters(\n bool x\n)\n```"]]