tensorflow:: אופס:: MatMul
#include <math_ops.h>
הכפל את המטריצה "a" במטריצה "b".
תַקצִיר
התשומות חייבות להיות מטריצות דו-ממדיות והממד הפנימי של "a" (לאחר שהועבר אם transpose_a נכון) חייב להתאים לממד החיצוני של "b" (לאחר ההעברה אם transposed_b נכון).
הערה : יישום ליבת ברירת המחדל עבור MatMul ב-GPU משתמש ב-cublas.
טיעונים:
- scope: אובייקט Scope
מאפיינים אופציונליים (ראה Attrs
):
- transpose_a: אם נכון, "a" עובר טרנספוזיציה לפני הכפל.
- transpose_b: אם נכון, "b" מועבר לפני הכפל.
החזרות:
-
Output
: טנזור המוצר.
בנאים והורסים | |
---|---|
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) |
תכונות ציבוריות | |
---|---|
operation | |
product |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
פונקציות סטטיות ציבוריות | |
---|---|
TransposeA (bool x) | |
TransposeB (bool x) |
מבנים | |
---|---|
tensorflow:: ops:: MatMul:: Attrs | קובעי תכונות אופציונליים עבור MatMul . |
תכונות ציבוריות
מִבצָע
Operation operation
מוּצָר
::tensorflow::Output product
תפקידים ציבוריים
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 )
צוֹמֶת
::tensorflow::Node * node() const
מפעיל::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
פונקציות סטטיות ציבוריות
TransposeA
Attrs TransposeA( bool x )
TransposeB
Attrs TransposeB( bool x )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# tensorflow::ops::MatMul Class Reference\n\ntensorflow::ops::MatMul\n=======================\n\n`#include \u003cmath_ops.h\u003e`\n\n[Multiply](/versions/r2.3/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/r2.3/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/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.3/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/r2.3/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/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` a, ::`[tensorflow::Input](/versions/r2.3/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/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` a, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` b, const `[MatMul::Attrs](/versions/r2.3/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/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [product](#classtensorflow_1_1ops_1_1_mat_mul_1ab034be60cd7ec86407eb741bdfc5f379) | `::`[tensorflow::Output](/versions/r2.3/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/r2.3/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/r2.3/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/r2.3/api_docs/cc/struct/tensorflow/ops/mat-mul/attrs) | Optional attribute setters for [MatMul](/versions/r2.3/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```"]]