tensorflow::ops::Gather

#include <array_ops.h>

Thu thập các lát cắt từ params theo indices .

Bản tóm tắt

indices phải là một tensor số nguyên có bất kỳ chiều nào (thường là 0 chiều hoặc 1 chiều). Tạo ra một tensor đầu ra có hình dạng indices.shape + params.shape[1:] trong đó:

    # Scalar indices
    output[:, ..., :] = params[indices, :, ... :]

    # Vector indices
    output[i, :, ..., :] = params[indices[i], :, ... :]

    # Higher rank indices
    output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :]

Nếu indices là một hoán vị và len(indices) == params.shape[0] thì thao tác này sẽ hoán vị params tương ứng.

validate_indices : ĐÃ BỊ LOẠI BỎ. Nếu thao tác này được gán cho CPU, các giá trị trong indices luôn được kiểm tra xem có nằm trong phạm vi cho phép hay không. Nếu được gán cho GPU, các chỉ mục nằm ngoài phạm vi cho phép sẽ dẫn đến hành vi an toàn nhưng không được xác định rõ, có thể bao gồm việc báo lỗi.

Luận điểm:

Trả về:

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

Gather (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices)
Gather (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, const Gather::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

ValidateIndices (bool x)

Cấu trúc

tensorflow::ops::Gather::Attrs

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

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

Tập trung

 Gather(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices
)

Tập trung

 Gather(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices,
  const Gather::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

Xác thực chỉ mục

Attrs ValidateIndices(
  bool x
)