Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
#include <array_ops.h>
Wyodrębnij patches
z images
i umieść je w wymiarze wyjściowym „głębokość”.
Streszczenie
Argumenty:
- zakres: Obiekt Scope
- obrazy: Tensor 4-D z kształtem
[batch, in_rows, in_cols, depth]
. - ksizes: Rozmiar przesuwanego okna dla każdego wymiaru
images
. - kroki: Jak daleko na obrazach znajdują się środki dwóch kolejnych fragmentów. Musi być:
[1, stride_rows, stride_cols, 1]
. - stawki: Musi wynosić:
[1, rate_rows, rate_cols, 1]
. Jest to krok wejściowy, określający, jak daleko na wejściu znajdują się dwie kolejne próbki fragmentów. Równoważne wyodrębnieniu poprawek za pomocą patch_sizes_eff = patch_sizes + (patch_sizes - 1) * (rates - 1)
, a następnie późniejszemu podpróbkowaniu ich przestrzennie przez współczynnik rates
. Jest to równoważne rate
w rozszerzonych zwojach (inaczej Atrous). - dopełnienie: typ algorytmu dopełniania, który ma zostać użyty.
Zwroty:
-
Output
: Tensor 4-D o kształcie [batch, out_rows, out_cols, ksize_rows * ksize_cols * depth]
zawierający poprawki obrazu o rozmiarze ksize_rows x ksize_cols x depth
wektoryzowane w wymiarze „głębokość”. Uwaga out_rows
i out_cols
to wymiary poprawek wyjściowych.
Atrybuty publiczne
Funkcje publiczne
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-27 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\nArguments:\n\n- scope: A [Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- images: 4-D [Tensor](/versions/r2.3/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.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 4-D [Tensor](/versions/r2.3/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.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/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.3/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.3/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```"]]