tensorflow::ops::MaxPoolWithArgmax

#include <nn_ops.h>

ทำการค้นหาค่าสูงสุดโดยใช้เทคนิค Max Pooling กับข้อมูลอินพุต และส่งออกทั้งค่าสูงสุดและดัชนี

สรุป

ดัชนีใน argmax จะถูกทำให้แบนราบ ดังนั้นค่าสูงสุดที่ตำแหน่ง [b, y, x, c] จะกลายเป็นดัชนีที่แบนราบ: (y * width + x) * channels + c ถ้า include_batch_in_index เป็น False; ((b * height + y) * width + x) * channels + c ถ้า include_batch_in_index เป็น True

ค่าดัชนีที่ส่งคืนจะอยู่ในช่วง [0, height) x [0, width) เสมอ ก่อนที่จะทำการแปลงให้แบนราบ แม้ว่าจะมีการเติมช่องว่างและคำตอบที่ถูกต้องทางคณิตศาสตร์อยู่นอกช่วง (เป็นค่าลบหรือใหญ่เกินไป) ก็ตาม นี่เป็นข้อบกพร่อง แต่การแก้ไขทำได้ยากด้วยวิธีที่ปลอดภัยและเข้ากันได้กับเวอร์ชันก่อนหน้า โดยเฉพาะอย่างยิ่งเนื่องจากการแปลงให้แบนราบ

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • อินพุต: 4 มิติ ที่มีรูปร่าง [batch, height, width, channels] อินพุต สำหรับพูล
  • ksize: ขนาดของหน้าต่างสำหรับแต่ละมิติของเทนเซอร์อินพุต
  • strides: ระยะก้าวของหน้าต่างเลื่อนสำหรับแต่ละมิติของเทนเซอร์อินพุต
  • การเติมช่องว่าง: ประเภทของอัลกอริทึมการเติมช่องว่างที่จะใช้

คุณลักษณะเสริม (ดูที่ Attrs ):

  • include_batch_in_index: ระบุว่าจะรวมมิติแบทช์ในดัชนีแบบแบนของ argmax หรือไม่

การส่งคืนสินค้า:

  • Output : เทนเซอร์ผลลัพธ์ที่รวมกันสูงสุด
  • Output argmax: 4 มิติ ดัชนีแบบแบนของค่าสูงสุดที่เลือกสำหรับแต่ละเอาต์พุต

ตัวสร้างและตัวทำลาย

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)

คุณลักษณะสาธารณะ

argmax
operation
output

ฟังก์ชันคงที่สาธารณะ

IncludeBatchInIndex (bool x)
Targmax (DataType x)

โครงสร้าง

tensorflow::ops::MaxPoolWithArgmax::Attrs

ตัวเลือกในการตั้งค่าแอตทริบิวต์สำหรับ MaxPoolWithArgmax

คุณลักษณะสาธารณะ

อาร์กแม็กซ์

::tensorflow::Output argmax

การดำเนินการ

Operation operation

เอาต์พุต

::tensorflow::Output output

หน้าที่สาธารณะ

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
)

ฟังก์ชันคงที่สาธารณะ

รวมชุดข้อมูลในดัชนี

Attrs IncludeBatchInIndex(
  bool x
)

ทาร์กแม็กซ์

Attrs Targmax(
  DataType x
)