tensorflow::ops::ArgMax
#include <math_ops.h>ส่งคืนดัชนีที่มีค่ามากที่สุดในแต่ละมิติของเทนเซอร์
สรุป
โปรดทราบว่าในกรณีที่มีค่าเท่ากัน ค่าที่ส่งคืนอาจไม่คงที่
วิธีใช้งาน:
import tensorflow as tf a = [1, 10, 26.9, 2.8, 166.32, 62.3] b = tf.math.argmax(input = a) c = tf.keras.backend.eval(b) # c = 4 # here a[4] = 166.32 which is the largest element of a across axis 0
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- มิติ: int32 หรือ int64 ต้องอยู่ในช่วง
[-rank(input), rank(input))ระบุถึงมิติของ เทนเซอร์อินพุต ที่จะลดขนาด สำหรับเวกเตอร์ ให้ใช้ dimension = 0
การส่งคืนสินค้า:
-
Output: เทนเซอร์เอาต์พุต
ตัวสร้างและตัวทำลาย | |
|---|---|
ArgMax (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input dimension) | |
ArgMax (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input dimension, const ArgMax::Attrs & attrs) |
คุณลักษณะสาธารณะ | |
|---|---|
operation | |
output | |
หน้าที่สาธารณะ | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
ฟังก์ชันคงที่สาธารณะ | |
|---|---|
OutputType (DataType x) | |
โครงสร้าง | |
|---|---|
| tensorflow::ops::ArgMax::Attrs | ตัวเลือกในการตั้งค่าแอตทริบิวต์สำหรับ ArgMax |
คุณลักษณะสาธารณะ
การดำเนินการ
Operation operation
เอาต์พุต
::tensorflow::Output output
หน้าที่สาธารณะ
อาร์กแม็กซ์
ArgMax( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input dimension )
อาร์กแม็กซ์
ArgMax( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input dimension, const ArgMax::Attrs & attrs )
โหนด
::tensorflow::Node * node() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต
operator::tensorflow::Output() const
ฟังก์ชันคงที่สาธารณะ
ประเภทเอาต์พุต
Attrs OutputType( DataType x )