جریان تنسور:: عملیات:: ExtractImagePatch
#include <array_ops.h>
patches
از images
استخراج کنید و آنها را در بعد خروجی "عمق" قرار دهید.
خلاصه
استدلال ها:
- scope: یک شی Scope
- تصاویر: تانسور 4 بعدی با شکل
[batch, in_rows, in_cols, depth]
. - ksizes: اندازه پنجره کشویی برای هر بعد از
images
. - strides: فاصله مرکز دو وصله متوالی در تصاویر چقدر است. باید:
[1, stride_rows, stride_cols, 1]
. - نرخها: باید:
[1, rate_rows, rate_cols, 1]
باشد. این گام ورودی است که مشخص می کند دو نمونه پچ متوالی چقدر در ورودی قرار دارند. معادل استخراج وصله ها باpatch_sizes_eff = patch_sizes + (patch_sizes - 1) * (rates - 1)
و به دنبال آن نمونه برداری از آنها به صورت مکانی با ضریبrates
. این معادلrate
در پیچش های متسع (معروف به آتروس) است. - padding: نوع الگوریتم padding مورد استفاده.
برمیگرداند:
-
Output
: تانسور 4 بعدی با شکل[batch, out_rows, out_cols, ksize_rows * ksize_cols * depth]
حاوی وصلههای تصویر با اندازهksize_rows x ksize_cols x depth
بردار در بعد "عمق". توجه داشته باشیدout_rows
وout_cols
ابعاد وصله های خروجی هستند.
سازندگان و ویرانگرها | |
---|---|
ExtractImagePatches (const :: tensorflow::Scope & scope, :: tensorflow::Input images, const gtl::ArraySlice< int > & ksizes, const gtl::ArraySlice< int > & strides, const gtl::ArraySlice< int > & rates, StringPiece padding) |
صفات عمومی | |
---|---|
operation | |
patches |
توابع عمومی | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
صفات عمومی
عملیات
Operation operation
تکه ها
::tensorflow::Output patches
توابع عمومی
ExtractImagePatch
ExtractImagePatches( const ::tensorflow::Scope & scope, ::tensorflow::Input images, const gtl::ArraySlice< int > & ksizes, const gtl::ArraySlice< int > & strides, const gtl::ArraySlice< int > & rates, StringPiece padding )
گره
::tensorflow::Node * node() const
عملگر::tensorflow::ورودی
operator::tensorflow::Input() const
عملگر::tensorflow::خروجی
operator::tensorflow::Output() const
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-27 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-27 بهوقت ساعت هماهنگ جهانی."],[],[],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```"]]