tensorflow:: ops:: SparseMatMul
#include <math_ops.h>
Multiply matrix "a" by matrix "b".
Summary
The inputs must be two-dimensional matrices and the inner dimension of "a" must match the outer dimension of "b". Both "a" and "b" must be Tensors not SparseTensors. This op is optimized for the case where at least one of "a" or "b" is sparse, in the sense that they have a large proportion of zero values. The breakeven for using this versus a dense matrix multiply on one platform was 30% zero values in the sparse matrix.
The gradient computation of this operation will only take advantage of sparsity in the input gradient when that gradient comes from a Relu.
Arguments:
- scope: A Scope object
Returns:
Output: The product tensor.
Constructors and Destructors |
|
|---|---|
SparseMatMul(const ::tensorflow::Scope & scope, ::tensorflow::Input a, ::tensorflow::Input b)
|
|
SparseMatMul(const ::tensorflow::Scope & scope, ::tensorflow::Input a, ::tensorflow::Input b, const SparseMatMul::Attrs & attrs)
|
Public attributes |
|
|---|---|
operation
|
|
product
|
|
Public functions |
|
|---|---|
node() const
|
::tensorflow::Node *
|
operator::tensorflow::Input() const
|
|
operator::tensorflow::Output() const
|
|
Public static functions |
|
|---|---|
AIsSparse(bool x)
|
|
BIsSparse(bool x)
|
|
TransposeA(bool x)
|
|
TransposeB(bool x)
|
|
Structs |
|
|---|---|
|
tensorflow:: |
Optional attribute setters for SparseMatMul. |
Public attributes
operation
Operation operation
product
::tensorflow::Output product
Public functions
SparseMatMul
SparseMatMul( const ::tensorflow::Scope & scope, ::tensorflow::Input a, ::tensorflow::Input b )
SparseMatMul
SparseMatMul( const ::tensorflow::Scope & scope, ::tensorflow::Input a, ::tensorflow::Input b, const SparseMatMul::Attrs & attrs )
node
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
AIsSparse
Attrs AIsSparse( bool x )
BIsSparse
Attrs BIsSparse( bool x )
TransposeA
Attrs TransposeA( bool x )
TransposeB
Attrs TransposeB( bool x )