tensorflow::ops::SparseReduceMaxSparse
#include <sparse_ops.h>Tính giá trị lớn nhất của các phần tử trên các chiều của SparseTensor.
Bản tóm tắt
Op này nhận một SparseTensor và là phiên bản thưa của tf.reduce_max() . Trái ngược với SparseReduceMax , Op này trả về một SparseTensor.
Giảm sp_input theo các chiều được chỉ định trong reduction_axes . Trừ khi keep_dims là true, hạng của tensor sẽ giảm đi 1 cho mỗi mục trong reduction_axes . Nếu keep_dims là true, các chiều đã giảm sẽ được giữ nguyên với độ dài là 1.
Nếu reduction_axes không có mục nào, tất cả các chiều sẽ được giảm bớt và một tensor chỉ có một phần tử sẽ được trả về. Ngoài ra, các trục có thể có giá trị âm, được diễn giải theo các quy tắc lập chỉ mục trong Python.
Luận điểm:
- phạm vi: Một đối tượng Phạm vi
- input_indices: Ma trận 2 chiều
N x Rchứa các chỉ số của các giá trị không rỗng trong SparseTensor, có thể không theo thứ tự chuẩn. - input_values: 1 chiều.
Ngiá trị không rỗng tương ứng vớiinput_indices. - input_shape: 1 chiều. Hình dạng của SparseTensor đầu vào.
- reduction_axes: Vectơ 1 chiều có độ dài
Kchứa các trục giảm.
Các thuộc tính tùy chọn (xem Attrs ):
- keep_dims: Nếu là true, giữ nguyên kích thước giảm với độ dài 1.
Trả về:
Hàm khởi tạo và hàm hủy | |
|---|---|
SparseReduceMaxSparse (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_values, :: tensorflow::Input input_shape, :: tensorflow::Input reduction_axes) | |
SparseReduceMaxSparse (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_values, :: tensorflow::Input input_shape, :: tensorflow::Input reduction_axes, const SparseReduceMaxSparse::Attrs & attrs) |
Thuộc tính công khai | |
|---|---|
operation | |
output_indices | |
output_shape | |
output_values | |
Các hàm tĩnh công khai | |
|---|---|
KeepDims (bool x) | |
Cấu trúc | |
|---|---|
| tensorflow::ops::SparseReduceMaxSparse::Attrs | Các thiết lập thuộc tính tùy chọn cho SparseReduceMaxSparse . |
Thuộc tính công khai
hoạt động
Operation operation
chỉ số đầu ra
::tensorflow::Output output_indices
hình dạng đầu ra
::tensorflow::Output output_shape
giá trị đầu ra
::tensorflow::Output output_values
Chức năng công cộng
SparseReduceMaxSparse
SparseReduceMaxSparse( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape, ::tensorflow::Input reduction_axes )
SparseReduceMaxSparse
SparseReduceMaxSparse( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape, ::tensorflow::Input reduction_axes, const SparseReduceMaxSparse::Attrs & attrs )
Các hàm tĩnh công khai
KeepDims
Attrs KeepDims( bool x )