tensorflow::ops::MaxPoolWithArgmax

#include <nn_ops.h>

Melakukan max pooling pada input dan menghasilkan nilai maksimum serta indeks.

Ringkasan

Indeks dalam argmax diratakan, sehingga nilai maksimum pada posisi [b, y, x, c] menjadi indeks yang diratakan: (y * width + x) * channels + c jika include_batch_in_index bernilai False; ((b * height + y) * width + x) * channels + c jika include_batch_in_index bernilai True.

Indeks yang dikembalikan selalu berada dalam rentang [0, height) x [0, width) sebelum perataan, bahkan jika ada penambahan padding dan jawaban yang benar secara matematis berada di luar (baik negatif atau terlalu besar). Ini adalah bug, tetapi memperbaikinya sulit dilakukan dengan cara yang aman dan kompatibel dengan versi sebelumnya, terutama karena adanya perataan.

Argumen:

  • Cakupan: Objek Cakupan
  • Input: 4-D dengan bentuk [batch, height, width, channels] . Input untuk diproses oleh pool.
  • ksize: Ukuran jendela untuk setiap dimensi tensor input.
  • strides: Langkah jendela geser untuk setiap dimensi tensor input.
  • padding: Jenis algoritma padding yang akan digunakan.

Atribut opsional (lihat Attrs ):

  • include_batch_in_index: Apakah dimensi batch akan disertakan dalam indeks yang diratakan dari argmax .

Mengembalikan:

  • Output output: Tensor output hasil max pooling.
  • Output argmax: 4-D. Indeks yang diratakan dari nilai maksimum yang dipilih untuk setiap output.

Konstruktor dan Destruktor

MaxPoolWithArgmax (const :: tensorflow::Scope & scope, :: tensorflow::Input input, const gtl::ArraySlice< int > & ksize, const gtl::ArraySlice< int > & strides, StringPiece padding)
MaxPoolWithArgmax (const :: tensorflow::Scope & scope, :: tensorflow::Input input, const gtl::ArraySlice< int > & ksize, const gtl::ArraySlice< int > & strides, StringPiece padding, const MaxPoolWithArgmax::Attrs & attrs)

Atribut publik

argmax
operation
output

Fungsi statis publik

IncludeBatchInIndex (bool x)
Targmax (DataType x)

Struktur

tensorflow::ops::MaxPoolWithArgmax::Attrs

Pengaturan atribut opsional untuk MaxPoolWithArgmax .

Atribut publik

argmax

::tensorflow::Output argmax

operasi

Operation operation

keluaran

::tensorflow::Output output

Fungsi publik

MaxPoolWithArgmax

 MaxPoolWithArgmax(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  const gtl::ArraySlice< int > & ksize,
  const gtl::ArraySlice< int > & strides,
  StringPiece padding
)

MaxPoolWithArgmax

 MaxPoolWithArgmax(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  const gtl::ArraySlice< int > & ksize,
  const gtl::ArraySlice< int > & strides,
  StringPiece padding,
  const MaxPoolWithArgmax::Attrs & attrs
)

Fungsi statis publik

SertakanBatchDalamIndeks

Attrs IncludeBatchInIndex(
  bool x
)

Targmax

Attrs Targmax(
  DataType x
)