MatMul
tensorflow C++ API
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 forMatMulon GPUs uses cublas.
Arguments:
- scope: A Scope object
Optional attributes (seeAttrs
):
- transpose_a: If true, "a" is transposed before multiplication.
- transpose_b: If true, "b" is transposed before multiplication.
Returns:
Output
: The product tensor.
Constructor
- MatMul(const ::tensorflow::Scope & scope, ::tensorflow::Input a, ::tensorflow::Input b, const MatMul::Attrs & attrs)
Public attributes
- tensorflow::Output product
MatMul block
Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_math.cpp
Argument:
- Scope scope : A Scope object(A scope is generated automatically each page. A scope is not connected.).
- Input a : connect Input node.
- Input b : connect Input node.
- MatMul::Attrs attrs : Input attrs in value. ex) transpose_a_=true;transpose_b_=false
Return:
- Output product : Output object of MatMul class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.