Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
tensor akışı:: işlem:: MaxPoolWithArgmax
#include <nn_ops.h>
Girişte maksimum havuzlama gerçekleştirir ve hem maksimum değerleri hem de endeksleri çıkarır.
Özet
argmax
indeksler düzleştirilir, böylece [b, y, x, c]
konumundaki maksimum değer düzleştirilmiş indeks haline gelir: (y * width + x) * channels + c
eğer include_batch_in_index
False ise; ((b * height + y) * width + x) * channels + c
eğer include_batch_in_index
True ise.
Döndürülen indeksler, dolgu söz konusu olsa ve matematiksel olarak doğru cevap dışarıda olsa bile (negatif veya çok büyük), düzleştirmeden önce her zaman [0, height) x [0, width)
cinsindendir. Bu bir hatadır, ancak özellikle düzleşme nedeniyle bunu güvenli bir şekilde geriye dönük olarak uyumlu bir şekilde düzeltmek zordur.
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- giriş: şekilli 4-D
[batch, height, width, channels]
. Havuza girmek için giriş yapın . - ksize: Giriş tensörünün her boyutu için pencerenin boyutu.
- adımlar: Giriş tensörünün her boyutu için kayan pencerenin adımı.
- padding: Kullanılacak dolgu algoritmasının türü.
İsteğe bağlı özellikler (bkz. Attrs
):
- include_batch_in_index: Toplu boyutun
argmax
düzleştirilmiş dizinine dahil edilip edilmeyeceği.
İade:
-
Output
çıkışı: Maksimum havuzlanmış çıkış tensörü. -
Output
argmax: 4-D. Her çıkış için seçilen maksimum değerlerin düzleştirilmiş endeksleri.
Genel özellikler
Kamu işlevleri
MaxPoolWithArgmax
MaxPoolWithArgmax(
const ::tensorflow::Scope & scope,
::tensorflow::Input input,
const gtl::ArraySlice< int > & ksize,
const gtl::ArraySlice< int > & strides,
StringPiece padding
)
Genel statik işlevler
IncludeBatchInIndex
Attrs IncludeBatchInIndex(
bool x
)
Targmax
Attrs Targmax(
DataType x
)
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::MaxPoolWithArgmax Class Reference\n\ntensorflow::ops::MaxPoolWithArgmax\n==================================\n\n`#include \u003cnn_ops.h\u003e`\n\nPerforms max pooling on the input and outputs both max values and indices.\n\nSummary\n-------\n\nThe indices in `argmax` are flattened, so that a maximum value at position `[b, y, x, c]` becomes flattened index: `(y * width + x) * channels + c` if `include_batch_in_index` is False; `((b * height + y) * width + x) * channels + c` if `include_batch_in_index` is True.\n\nThe indices returned are always in `[0, height) x [0, width)` before flattening, even if padding is involved and the mathematically correct answer is outside (either negative or too large). This is a bug, but fixing it is difficult to do in a safe backwards compatible way, especially due to flattening.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: 4-D with shape `[batch, height, width, channels]`. [Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input) to pool over.\n- ksize: The size of the window for each dimension of the input tensor.\n- strides: The stride of the sliding window for each dimension of the input tensor.\n- padding: The type of padding algorithm to use.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/max-pool-with-argmax/attrs#structtensorflow_1_1ops_1_1_max_pool_with_argmax_1_1_attrs)):\n\n- include_batch_in_index: Whether to include batch dimension in flattened index of `argmax`.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output: The max pooled output tensor.\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) argmax: 4-D. The flattened indices of the max values chosen for each output.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [MaxPoolWithArgmax](#classtensorflow_1_1ops_1_1_max_pool_with_argmax_1abb51fa41db084247e489859748d89eec)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, const gtl::ArraySlice\u003c int \u003e & ksize, const gtl::ArraySlice\u003c int \u003e & strides, StringPiece padding)` ||\n| [MaxPoolWithArgmax](#classtensorflow_1_1ops_1_1_max_pool_with_argmax_1a0c2a8005c65f80a0714ab13c31ac9b4a)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, const gtl::ArraySlice\u003c int \u003e & ksize, const gtl::ArraySlice\u003c int \u003e & strides, StringPiece padding, const `[MaxPoolWithArgmax::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/max-pool-with-argmax/attrs#structtensorflow_1_1ops_1_1_max_pool_with_argmax_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [argmax](#classtensorflow_1_1ops_1_1_max_pool_with_argmax_1a3ee6b2270133581582b335bb54c206cd) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_max_pool_with_argmax_1ad70c7f4c8878ff933f05f49d914b32c5) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_max_pool_with_argmax_1ae10e4e4c026e2fb47004e52ccae14cd5) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| [IncludeBatchInIndex](#classtensorflow_1_1ops_1_1_max_pool_with_argmax_1a4e5f3eabc676bb9818da7a13ed74280d)`(bool x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/max-pool-with-argmax/attrs#structtensorflow_1_1ops_1_1_max_pool_with_argmax_1_1_attrs) |\n| [Targmax](#classtensorflow_1_1ops_1_1_max_pool_with_argmax_1a42ae4bbc217faf11615e6e2248886754)`(DataType x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/max-pool-with-argmax/attrs#structtensorflow_1_1ops_1_1_max_pool_with_argmax_1_1_attrs) |\n\n| ### Structs ||\n|--------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::MaxPoolWithArgmax::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/max-pool-with-argmax/attrs) | Optional attribute setters for [MaxPoolWithArgmax](/versions/r2.1/api_docs/cc/class/tensorflow/ops/max-pool-with-argmax#classtensorflow_1_1ops_1_1_max_pool_with_argmax). |\n\nPublic attributes\n-----------------\n\n### argmax\n\n```text\n::tensorflow::Output argmax\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### MaxPoolWithArgmax\n\n```gdscript\n MaxPoolWithArgmax(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const gtl::ArraySlice\u003c int \u003e & ksize,\n const gtl::ArraySlice\u003c int \u003e & strides,\n StringPiece padding\n)\n``` \n\n### MaxPoolWithArgmax\n\n```gdscript\n MaxPoolWithArgmax(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const gtl::ArraySlice\u003c int \u003e & ksize,\n const gtl::ArraySlice\u003c int \u003e & strides,\n StringPiece padding,\n const MaxPoolWithArgmax::Attrs & attrs\n)\n``` \n\nPublic static functions\n-----------------------\n\n### IncludeBatchInIndex\n\n```text\nAttrs IncludeBatchInIndex(\n bool x\n)\n``` \n\n### Targmax\n\n```text\nAttrs Targmax(\n DataType x\n)\n```"]]