Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::ResizeNearestNeighbor
#include <image_ops.h>
Resize images
to size
using nearest neighbor interpolation.
Summary
Args:
- scope: A Scope object
- images: 4-D with shape
[batch, height, width, channels]
.
- size: = A 1-D int32 Tensor of 2 elements:
new_height, new_width
. The new size for the images.
Optional attributes (see Attrs
):
- 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.
Returns:
Output
: 4-D with shape [batch, new_height, new_width, channels]
.
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
AlignCorners
Attrs AlignCorners(
bool x
)
HalfPixelCenters
Attrs HalfPixelCenters(
bool x
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2021-11-15 UTC.
[null,null,["Last updated 2021-11-15 UTC."],[],[],null,["# tensorflow::ops::ResizeNearestNeighbor Class Reference\n\ntensorflow::ops::ResizeNearestNeighbor\n======================================\n\n`#include \u003cimage_ops.h\u003e`\n\nResize `images` to `size` using nearest neighbor interpolation.\n\nSummary\n-------\n\nArgs:\n\n- scope: A [Scope](/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](/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](/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_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](/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| [ResizeNearestNeighbor](#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a761fcaa879c10aefeec7d336c1695dbe)`(const ::`[tensorflow::Scope](/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` images, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size)` ||\n| [ResizeNearestNeighbor](#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1ae32cb1a2efb9fc7d9ecd04c33c95396a)`(const ::`[tensorflow::Scope](/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` images, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size, const `[ResizeNearestNeighbor::Attrs](/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1afbdcb2a978bc8cddb8a0ae142c6122b7) | [Operation](/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [resized_images](#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a712b5521f03955dd2c8dd9d4fc80a8e9) | `::`[tensorflow::Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a32fd059ad2b707aeac9c69cdaeb7a41f)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a1c15b7ce69776c76fa911ed327e4ebe6)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a3e913e24e4a326f695d0e58f1c759676)`() const ` | |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| [AlignCorners](#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a48ad406e3999c115dcf8e8260c3861da)`(bool x)` | [Attrs](/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs) |\n| [HalfPixelCenters](#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a740fbf067e627cfad4d5d8eb1b17583a)`(bool x)` | [Attrs](/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs) |\n\n| ### Structs ||\n|-------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ResizeNearestNeighbor::Attrs](/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs) | Optional attribute setters for [ResizeNearestNeighbor](/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor). |\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### ResizeNearestNeighbor\n\n```gdscript\n ResizeNearestNeighbor(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input images,\n ::tensorflow::Input size\n)\n``` \n\n### ResizeNearestNeighbor\n\n```gdscript\n ResizeNearestNeighbor(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input images,\n ::tensorflow::Input size,\n const ResizeNearestNeighbor::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```"]]