Tensorflow :: ops :: SparseReduceSumSparse
#include <sparse_ops.h>
Berechnet die Summe der Elemente über die Dimensionen eines SparseTensors.
Zusammenfassung
Diese Operation benötigt einen SparseTensor und ist das spärliche Gegenstück zu tf.reduce_sum()
. Im Gegensatz zu SparseReduceSum gibt diese Operation einen SparseTensor zurück.
Reduziert sp_input
entlang der in reduction_axes
angegebenen Dimensionen. Sofern keep_dims
nicht keep_dims
ist, wird der Rang des Tensors für jeden Eintrag in reduction_axes
um 1 reduction_axes
. Wenn keep_dims
true ist, werden die reduzierten Abmessungen mit der Länge 1 beibehalten.
Wenn reduction_axes
keine Einträge hat, werden alle Dimensionen reduziert und ein Tensor mit einem einzelnen Element zurückgegeben. Außerdem können die Achsen negativ sein, die gemäß den Indizierungsregeln in Python interpretiert werden.
Argumente:
- scope: Ein Scope- Objekt
- input_indices: 2-D.
N x R
Matrix mit den Indizes nicht leerer Werte in einem SparseTensor, möglicherweise nicht in kanonischer Reihenfolge. - Eingabewerte: 1-D.
N
nicht leere Werte entsprechendinput_indices
. - input_shape: 1-D. Form des eingegebenen SparseTensors.
- Reduktionsachsen: 1-D. Längen-
K
Vektor, der die Reduktionsachsen enthält.
Optionale Attribute (siehe Attrs
):
- keep_dims: Wenn true, behalten Sie reduzierte Abmessungen mit der Länge 1 bei.
Kehrt zurück:
Konstruktoren und Destruktoren | |
---|---|
SparseReduceSumSparse (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_values, :: tensorflow::Input input_shape, :: tensorflow::Input reduction_axes) | |
SparseReduceSumSparse (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_values, :: tensorflow::Input input_shape, :: tensorflow::Input reduction_axes, const SparseReduceSumSparse::Attrs & attrs) |
Öffentliche Attribute | |
---|---|
operation | |
output_indices | |
output_shape | |
output_values |
Öffentliche statische Funktionen | |
---|---|
KeepDims (bool x) |
Strukturen | |
---|---|
tensorflow :: ops :: SparseReduceSumSparse :: Attrs | Optionale Attributsetzer für SparseReduceSumSparse . |
Öffentliche Attribute
Operation
Operation operation
output_indices
::tensorflow::Output output_indices
output_shape
::tensorflow::Output output_shape
Ausgabewerte
::tensorflow::Output output_values
Öffentliche Funktionen
SparseReduceSumSparse
SparseReduceSumSparse( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape, ::tensorflow::Input reduction_axes )
SparseReduceSumSparse
SparseReduceSumSparse( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape, ::tensorflow::Input reduction_axes, const SparseReduceSumSparse::Attrs & attrs )
Öffentliche statische Funktionen
KeepDims
Attrs KeepDims( bool x )