Stay organized with collections
Save and categorize content based on your preferences.
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:
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
TransposeA
Attrs TransposeA(
bool x
)
TransposeB
Attrs TransposeB(
bool x
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-04-20 UTC.
[null,null,["Last updated 2020-04-20 UTC."],[],[],null,["# tensorflow::ops::MatMul Class Reference\n\ntensorflow::ops::MatMul\n=======================\n\n`#include \u003cmath_ops.h\u003e`\n\n[Multiply](/versions/r1.15/api_docs/cc/class/tensorflow/ops/multiply#classtensorflow_1_1ops_1_1_multiply) the matrix \"a\" by the matrix \"b\".\n\nSummary\n-------\n\nThe 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).\n\n*Note* : The default kernel implementation for [MatMul](/versions/r1.15/api_docs/cc/class/tensorflow/ops/mat-mul#classtensorflow_1_1ops_1_1_mat_mul) on GPUs uses cublas.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/mat-mul/attrs#structtensorflow_1_1ops_1_1_mat_mul_1_1_attrs)):\n\n- transpose_a: If true, \"a\" is transposed before multiplication.\n- transpose_b: If true, \"b\" is transposed before multiplication.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The product tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [MatMul](#classtensorflow_1_1ops_1_1_mat_mul_1ab83040fb6ae9e56138c0f69b00760209)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` a, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` b)` ||\n| [MatMul](#classtensorflow_1_1ops_1_1_mat_mul_1a34177e68c8f4fa1f1813814ce67d891c)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` a, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` b, const `[MatMul::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/mat-mul/attrs#structtensorflow_1_1ops_1_1_mat_mul_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_mat_mul_1ab873d083b82c9aa9485a303d40b97eb4) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [product](#classtensorflow_1_1ops_1_1_mat_mul_1ab034be60cd7ec86407eb741bdfc5f379) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_mat_mul_1a0336cd912c0b25144c3d9b57a626debf)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_mat_mul_1abd3e6b08fb374614d203378c1dfaec97)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_mat_mul_1a9882a2914eeb6bb488bf990e3240f05a)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|\n| [TransposeA](#classtensorflow_1_1ops_1_1_mat_mul_1adde997ec4038167a5e5e31ad805e2651)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/mat-mul/attrs#structtensorflow_1_1ops_1_1_mat_mul_1_1_attrs) |\n| [TransposeB](#classtensorflow_1_1ops_1_1_mat_mul_1a94996492e8e4ff12164accf93c28dabd)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/mat-mul/attrs#structtensorflow_1_1ops_1_1_mat_mul_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::MatMul::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/mat-mul/attrs) | Optional attribute setters for [MatMul](/versions/r1.15/api_docs/cc/class/tensorflow/ops/mat-mul#classtensorflow_1_1ops_1_1_mat_mul). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### product\n\n```text\n::tensorflow::Output product\n``` \n\nPublic functions\n----------------\n\n### MatMul\n\n```gdscript\n MatMul(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input a,\n ::tensorflow::Input b\n)\n``` \n\n### MatMul\n\n```gdscript\n MatMul(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input a,\n ::tensorflow::Input b,\n const MatMul::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### TransposeA\n\n```text\nAttrs TransposeA(\n bool x\n)\n``` \n\n### TransposeB\n\n```text\nAttrs TransposeB(\n bool x\n)\n```"]]