dòng chảy căng:: ôi:: Tập hợpV2
#include <array_ops.h> Tập hợp các lát cắt từ axis trục 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 dạng params.shape[:axis] + indices.shape + params.shape[axis + 1:] trong đó:
# Scalar indices (output is rank(params) - 1).
output[a_0, ..., a_n, b_0, ..., b_n] =
params[a_0, ..., a_n, indices, b_0, ..., b_n]# Vector indices (output is rank(params)). output[a_0, ..., a_n, i, b_0, ..., b_n] = params[a_0, ..., a_n, indices[i], b_0, ..., b_n]
# Higher rank indices (output is rank(params) + rank(indices) - 1).
output[a_0, ..., a_n, i, ..., j, b_0, ... b_n] =
params[a_0, ..., a_n, indices[i, ..., j], b_0, ..., b_n]
Lưu ý rằng trên CPU, nếu tìm thấy chỉ mục ngoài giới hạn, lỗi sẽ được trả về. Trên GPU, nếu tìm thấy chỉ mục ngoài giới hạn, số 0 sẽ được lưu trong giá trị đầu ra tương ứng.
Xem thêm tf.batch_gather và tf.gather_nd .
Lập luận:
- phạm vi: Một đối tượng Phạm vi
- params: Tenxor để thu thập các giá trị. Ít nhất phải là
axis + 1. - chỉ số: tensor chỉ số. Phải nằm trong phạm vi
[0, params.shape[axis]). - trục: Trục trong
paramsđể thu thậpindicestừ đó. Mặc định là kích thước đầu tiên. Hỗ trợ các chỉ số tiêu cực.
Trả về:
-
Output: Các giá trị từparamsđược thu thập từ các chỉ số được cung cấp bởiindices, với hình dạngparams.shape[:axis] + indices.shape + params.shape[axis + 1:].
Hàm tạo và hàm hủy | |
|---|---|
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis) | |
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis, const GatherV2::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 | |
|---|---|
BatchDims (int64 x) | |
Cấu trúc | |
|---|---|
| tenorflow:: ops:: GatherV2:: Attrs | Bộ cài đặt thuộc tính tùy chọn cho GatherV2 . |
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 hợpV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis )
Tập hợpV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis, const GatherV2::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
hàng loạt
Attrs BatchDims( int64 x )