Stay organized with collections
Save and categorize content based on your preferences.
#include <array_ops.h>
Extract patches
from images
and put them in the "depth" output dimension.
Summary
Args:
- scope: A Scope object
- images: 4-D Tensor with shape
[batch, in_rows, in_cols, depth]
.
- ksizes: The size of the sliding window for each dimension of
images
.
- strides: How far the centers of two consecutive patches are in the images. Must be:
[1, stride_rows, stride_cols, 1]
.
- rates: Must be:
[1, rate_rows, rate_cols, 1]
. This is the input stride, specifying how far two consecutive patch samples are in the input. Equivalent to extracting patches with patch_sizes_eff = patch_sizes + (patch_sizes - 1) * (rates - 1)
, followed by subsampling them spatially by a factor of rates
. This is equivalent to rate
in dilated (a.k.a. Atrous) convolutions.
- padding: The type of padding algorithm to use.
Returns:
Output
: 4-D Tensor with shape [batch, out_rows, out_cols, ksize_rows * ksize_cols * depth]
containing image patches with size ksize_rows x ksize_cols x depth
vectorized in the "depth" dimension. Note out_rows
and out_cols
are the dimensions of the output patches.
Public attributes
Public functions
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 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tensorflow::ops::ExtractImagePatches Class Reference\n\ntensorflow::ops::ExtractImagePatches\n====================================\n\n`#include \u003carray_ops.h\u003e`\n\nExtract `patches` from `images` and put them in the \"depth\" output dimension.\n\nSummary\n-------\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- images: 4-D [Tensor](/versions/r2.14/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) with shape `[batch, in_rows, in_cols, depth]`.\n- ksizes: The size of the sliding window for each dimension of `images`.\n- strides: How far the centers of two consecutive patches are in the images. Must be: `[1, stride_rows, stride_cols, 1]`.\n- rates: Must be: `[1, rate_rows, rate_cols, 1]`. This is the input stride, specifying how far two consecutive patch samples are in the input. Equivalent to extracting patches with `patch_sizes_eff = patch_sizes + (patch_sizes - 1) * (rates - 1)`, followed by subsampling them spatially by a factor of `rates`. This is equivalent to `rate` in dilated (a.k.a. Atrous) convolutions.\n- padding: The type of padding algorithm to use.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 4-D [Tensor](/versions/r2.14/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) with shape `[batch, out_rows, out_cols, ksize_rows * ksize_cols * depth]` containing image patches with size `ksize_rows x ksize_cols x depth` vectorized in the \"depth\" dimension. Note `out_rows` and `out_cols` are the dimensions of the output patches.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ExtractImagePatches](#classtensorflow_1_1ops_1_1_extract_image_patches_1a48a27e59bf001d9d0599c4a4ad3abcf9)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` images, const gtl::ArraySlice\u003c int \u003e & ksizes, const gtl::ArraySlice\u003c int \u003e & strides, const gtl::ArraySlice\u003c int \u003e & rates, StringPiece padding)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_extract_image_patches_1a20f65de6816816f98d46af224137110d) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [patches](#classtensorflow_1_1ops_1_1_extract_image_patches_1a282b671f1a0d52422cd35c75d6819ee1) | `::`[tensorflow::Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_extract_image_patches_1a812a245b3efe85c0003da911be95b891)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_extract_image_patches_1a3dbc12d46ac43f4e5cb6868030310880)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_extract_image_patches_1a7a11be91c9fd8c6b3c5d48ae30630a18)`() const ` | |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### patches\n\n```text\n::tensorflow::Output patches\n``` \n\nPublic functions\n----------------\n\n### ExtractImagePatches\n\n```gdscript\n ExtractImagePatches(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input images,\n const gtl::ArraySlice\u003c int \u003e & ksizes,\n const gtl::ArraySlice\u003c int \u003e & strides,\n const gtl::ArraySlice\u003c int \u003e & rates,\n StringPiece padding\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```"]]