W3cubDocs

/TensorFlow C++

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". This op is optimized for the case where at least one of "a" or "b" is sparse. The breakeven for using this versus a dense matrix multiply on one platform was 30% zero values in the sparse matrix.

Arguments:

Returns:

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
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::ops::SparseMatMul::Attrs

Optional attribute setters for SparseMatMul.

Public attributes

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
)

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/sparse-mat-mul.html