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).
Args
a
A Tensor. Must be one of the following types: bfloat16, half, float32, float64, int32, int64, uint8, uint16, uint32, uint64, 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.MatMul\n\n\u003cbr /\u003e\n\nMultiply the matrix \"a\" by the matrix \"b\".\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.MatMul`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/MatMul)\n\n\u003cbr /\u003e\n\n tf.raw_ops.MatMul(\n a,\n b,\n transpose_a=False,\n transpose_b=False,\n grad_a=False,\n grad_b=False,\n name=None\n )\n\nThe inputs must be two-dimensional matrices and the inner dimension of\n\"a\" (after being transposed if transpose_a is true) must match the\nouter dimension of \"b\" (after being transposed if transposed_b is\ntrue).\n| **Note:** The default kernel implementation for MatMul on GPUs uses cublas.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `a` | A `Tensor`. Must be one of the following types: `bfloat16`, `half`, `float32`, `float64`, `int32`, `int64`, `uint8`, `uint16`, `uint32`, `uint64`, `complex64`, `complex128`. |\n| `b` | A `Tensor`. Must have the same type as `a`. |\n| `transpose_a` | An optional `bool`. Defaults to `False`. If true, \"a\" is transposed before multiplication. |\n| `transpose_b` | An optional `bool`. Defaults to `False`. If true, \"b\" is transposed before multiplication. |\n| `grad_a` | An optional `bool`. Defaults to `False`. |\n| `grad_b` | An optional `bool`. Defaults to `False`. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor`. Has the same type as `a`. ||\n\n\u003cbr /\u003e"]]