W3cubDocs

/TensorFlow C++

tensorflow::ops::MatMul

#include <math_ops.h>

Multiply the matrix "a" by the matrix "b".

Summary

The inputs must be two-dimensional matrices and the inner dimension of "a" (after being transposed if transpose_a is true) must match the outer dimension of "b" (after being transposed if transposed_b is true).

Note: The default kernel implementation for MatMul on GPUs uses cublas.

Arguments:

Optional attributes (see Attrs):

  • transpose_a: If true, "a" is transposed before multiplication.
  • transpose_b: If true, "b" is transposed before multiplication.

Returns:

Constructors and Destructors
MatMul(const ::tensorflow::Scope & scope, ::tensorflow::Input a, ::tensorflow::Input b)
MatMul(const ::tensorflow::Scope & scope, ::tensorflow::Input a, ::tensorflow::Input b, const MatMul::Attrs & attrs)
Public attributes
product
Public functions
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Public static functions
TransposeA(bool x)
TransposeB(bool x)
Structs
tensorflow::ops::MatMul::Attrs

Optional attribute setters for MatMul.

Public attributes

product

::tensorflow::Output product

Public functions

MatMul

 MatMul(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input a,
  ::tensorflow::Input b
)

MatMul

 MatMul(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input a,
  ::tensorflow::Input b,
  const MatMul::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

Public static functions

TransposeA

Attrs TransposeA(
  bool x
)

TransposeB

Attrs TransposeB(
  bool x
)

© 2018 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/mat-mul.html