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

tf.raw_ops.MatMul( a, b, transpose_a=False, transpose_b=False, name=None )

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.

Args | |
---|---|

`a` | A `Tensor` . Must be one of the following types: `bfloat16` , `half` , `float32` , `float64` , `int32` , `int64` , `complex64` , `complex128` . |

`b` | A `Tensor` . Must have the same type as `a` . |

`transpose_a` | An optional `bool` . Defaults to `False` . If true, "a" is transposed before multiplication. |

`transpose_b` | An optional `bool` . Defaults to `False` . If true, "b" is transposed before multiplication. |

`name` | A name for the operation (optional). |

Returns | |
---|---|

A `Tensor` . Has the same type as `a` . |

© 2020 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/versions/r2.4/api_docs/python/tf/raw_ops/MatMul