tensorflow::ops::ArgMin

#include <math_ops.h>

Trả về chỉ số có giá trị nhỏ nhất trên tất cả các chiều của tensor.

Bản tóm tắt

Lưu ý rằng trong trường hợp có kết quả bằng nhau, giá trị trả về không được đảm bảo là giống nhau.

Cách sử dụng:

  import tensorflow as tf
  a = [1, 10, 26.9, 2.8, 166.32, 62.3]
  b = tf.math.argmin(input = a)
  c = tf.keras.backend.eval(b)
  # c = 0
  # here a[0] = 1 which is the smallest element of a across axis 0
  

Luận điểm:

  • phạm vi: Một đối tượng Phạm vi
  • dimension: int32 hoặc int64, phải nằm trong khoảng [-rank(input), rank(input)) . Mô tả chiều nào của Tensor đầu vào cần được giảm bớt. Đối với vectơ, hãy sử dụng dimension = 0.

Trả về:

Hàm khởi tạo và hàm hủy

ArgMin (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input dimension)
ArgMin (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input dimension, const ArgMin::Attrs & attrs)

Thuộc tính công khai

operation
output

Chức năng công cộng

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

Các hàm tĩnh công khai

OutputType (DataType x)

Cấu trúc

tensorflow::ops::ArgMin::Attrs

Các thiết lập thuộc tính tùy chọn cho ArgMin .

Thuộc tính công khai

hoạt động

Operation operation

đầu ra

::tensorflow::Output output

Chức năng công cộng

ArgMin

 ArgMin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input dimension
)

ArgMin

 ArgMin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input dimension,
  const ArgMin::Attrs & attrs
)

nút

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

Các hàm tĩnh công khai

Loại đầu ra

Attrs OutputType(
  DataType x
)