dòng chảy căng:: ôi:: Tập trung

#include <array_ops.h>

Tập hợp các lát từ params theo indices .

Bản tóm tắt

indices phải là một tensor nguyên có chiều bất kỳ (thường là 0-D hoặc 1-D). Tạo ra một tenxơ đầu ra có hình 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 : KHÔNG DÙNG. Nếu thao tác này được gán cho CPU, các giá trị trong indices luôn được xác thực nằm trong phạm vi. Nếu được gán cho GPU, các chỉ số nằm ngoài giới hạn sẽ dẫn đến hành vi an toàn nhưng không xác định, có thể bao gồm cả việc gây ra lỗi.

Tranh luận:

Trả về:

Hàm 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

tenorflow:: ops:: Tập hợp:: Attrs

Trình 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 

toán tử::tenorflow::Đầu vào

 operator::tensorflow::Input() const 

toán tử::tenorflow::Đầu ra

 operator::tensorflow::Output() const 

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

Xác thực chỉ số

Attrs ValidateIndices(
  bool x
)