dòng chảy :: hoạt động :: Tụ họp

#include <array_ops.h>

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

Bản tóm tắt

indices phải là một số nguyên có kích thước bất kỳ (thường là 0-D hoặc 1-D). Tạo ra một tensor đầu ra với shape 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ẽ params vị các tham số tương ứng.

validate_indices : DEPRECATED. Nếu thao tác này được gán cho CPU, các giá trị trong indices luôn được xác nhận là nằm trong phạm vi. Nếu được gán cho GPU, các chỉ số ngoài giới hạn dẫn đến hành vi an toàn nhưng không xác định, có thể bao gồm việc phát sinh lỗi.

Tranh luận:

Lợi nhuận:

  • Output : Bộ căng đầu ra.

Người xây dựng và người phá 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

Chức năng tĩnh công khai

ValidateIndices (bool x)

Cấu trúc

tensorflow :: ops :: Gather :: Attrs

Bộ thiết lập thuộc tính tùy chọn cho Tập hợp .

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ụ họp

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

Tụ họp

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

nút

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

Chức năng tĩnh công khai

ValidateIndices

Attrs ValidateIndices(
  bool x
)