संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: बैचमैटमूल
#include <math_ops.h>
बैचों में दो टेंसर के स्लाइस को गुणा करता है।
सारांश
Tensor
x
और y
के सभी स्लाइस को गुणा करता है (प्रत्येक स्लाइस को बैच के एक तत्व के रूप में देखा जा सकता है), और व्यक्तिगत परिणामों को समान बैच आकार के एकल आउटपुट टेंसर में व्यवस्थित करता है। प्रत्येक व्यक्तिगत स्लाइस को वैकल्पिक रूप से adj_x
या adj_y
ध्वज को True
पर सेट करके गुणन से पहले जोड़ा जा सकता है (मैट्रिक्स को जोड़ने का मतलब इसे स्थानांतरित करना और संयुग्मित करना है), जो डिफ़ॉल्ट रूप से False
हैं।
इनपुट टेंसर x
और y
2-डी या उच्चतर आकार के हैं [..., r_x, c_x]
और [..., r_y, c_y]
।
आउटपुट टेंसर 2-डी या उच्चतर आकार के साथ है [..., r_o, c_o]
, जहां:
r_o = c_x if adj_x else r_x
c_o = r_y if adj_y else c_y
इसकी गणना इस प्रकार की जाती है:
output[..., :, :] = matrix(x[..., :, :]) * matrix(y[..., :, :])
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- x: 2-डी या उच्चतर आकार के साथ
[..., r_x, c_x]
। - y: 2-डी या उच्चतर आकार के साथ
[..., r_y, c_y]
।
वैकल्पिक विशेषताएँ (देखें Attrs
):
- adj_x: यदि
True
, तो x
के स्लाइस को जोड़ें। डिफ़ॉल्ट False
है। - adj_y: यदि
True
, तो y
के स्लाइस जोड़ें। डिफ़ॉल्ट False
है।
रिटर्न:
-
Output
: 3-डी या उच्चतर आकार के साथ [..., r_o, c_o]
सार्वजनिक स्थैतिक कार्य |
---|
AdjX (bool x) | |
AdjY (bool x) | |
सार्वजनिक गुण
सार्वजनिक समारोह
नोड
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ऑपरेटर::टेन्सरफ़्लो::आउटपुट
operator::tensorflow::Output() const
सार्वजनिक स्थैतिक कार्य
AdjX
Attrs AdjX(
bool x
)
AdjY
Attrs AdjY(
bool x
)
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[],null,["# tensorflow::ops::BatchMatMul Class Reference\n\ntensorflow::ops::BatchMatMul\n============================\n\n`#include \u003cmath_ops.h\u003e`\n\nMultiplies slices of two tensors in batches.\n\nSummary\n-------\n\nMultiplies all slices of [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor)`x` and `y` (each slice can be viewed as an element of a batch), and arranges the individual results in a single output tensor of the same batch size. Each of the individual slices can optionally be adjointed (to adjoint a matrix means to transpose and conjugate it) before multiplication by setting the `adj_x` or `adj_y` flag to `True`, which are by default `False`.\n\nThe input tensors `x` and `y` are 2-D or higher with shape `[..., r_x, c_x]` and `[..., r_y, c_y]`.\n\nThe output tensor is 2-D or higher with shape `[..., r_o, c_o]`, where: \n\n```scdoc\nr_o = c_x if adj_x else r_x\nc_o = r_y if adj_y else c_y\n```\n\n\u003cbr /\u003e\n\nIt is computed as: \n\n```scdoc\noutput[..., :, :] = matrix(x[..., :, :]) * matrix(y[..., :, :])\n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- x: 2-D or higher with shape `[..., r_x, c_x]`.\n- y: 2-D or higher with shape `[..., r_y, c_y]`.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/batch-mat-mul/attrs#structtensorflow_1_1ops_1_1_batch_mat_mul_1_1_attrs)):\n\n- adj_x: If `True`, adjoint the slices of `x`. Defaults to `False`.\n- adj_y: If `True`, adjoint the slices of `y`. Defaults to `False`.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 3-D or higher with shape `[..., r_o, c_o]`\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [BatchMatMul](#classtensorflow_1_1ops_1_1_batch_mat_mul_1a951cabca8c8dbcf8b746969d80f2b480)`(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)` x, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` y)` ||\n| [BatchMatMul](#classtensorflow_1_1ops_1_1_batch_mat_mul_1aec4aecf952592bd193eca45a9900ebe1)`(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)` x, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` y, const `[BatchMatMul::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/batch-mat-mul/attrs#structtensorflow_1_1ops_1_1_batch_mat_mul_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_batch_mat_mul_1a255c486fdefe3708a3355e3f85e8daf2) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_batch_mat_mul_1ad3a290bbf8589298ccf6cd5bf0018a53) | `::`[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_batch_mat_mul_1af21f279f44b701fb277af586e5f0dd69)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_batch_mat_mul_1aa6685ef6076abe41dc6d4f97156d77cb)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_batch_mat_mul_1a7d6d385af7d73a390e36ccc7e6989345)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| [AdjX](#classtensorflow_1_1ops_1_1_batch_mat_mul_1a47c8466020881eced6720f2f415053dd)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/batch-mat-mul/attrs#structtensorflow_1_1ops_1_1_batch_mat_mul_1_1_attrs) |\n| [AdjY](#classtensorflow_1_1ops_1_1_batch_mat_mul_1a3f939eb8aea098cdf431a3b626274e6b)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/batch-mat-mul/attrs#structtensorflow_1_1ops_1_1_batch_mat_mul_1_1_attrs) |\n\n| ### Structs ||\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::BatchMatMul::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/batch-mat-mul/attrs) | Optional attribute setters for [BatchMatMul](/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul#classtensorflow_1_1ops_1_1_batch_mat_mul). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### BatchMatMul\n\n```gdscript\n BatchMatMul(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x,\n ::tensorflow::Input y\n)\n``` \n\n### BatchMatMul\n\n```gdscript\n BatchMatMul(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x,\n ::tensorflow::Input y,\n const BatchMatMul::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### AdjX\n\n```text\nAttrs AdjX(\n bool x\n)\n``` \n\n### AdjY\n\n```text\nAttrs AdjY(\n bool x\n)\n```"]]