Operation
bookmark_borderbookmark
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेन्सर्स पर गणना करता है।
एक ऑपरेशन इनपुट के रूप में शून्य या अधिक Tensor
s (अन्य ऑपरेशनों द्वारा उत्पादित) लेता है, और आउटपुट के रूप में शून्य या अधिक Tensor
s उत्पन्न करता है।
सार्वजनिक तरीके
सार इंट | इनपुट सूची लंबाई (स्ट्रिंग नाम) इस ऑपरेशन के लिए टेंसर की दी गई इनपुट सूची का आकार लौटाता है। |
सार स्ट्रिंग | नाम () ऑपरेशन का पूरा नाम लौटाता है। |
सार इंट | संख्या आउटपुट () इस ऑपरेशन द्वारा उत्पादित टेंसरों की संख्या लौटाता है। |
सार <टी> आउटपुट <टी> | आउटपुट (int idx) इस ऑपरेशन द्वारा उत्पादित टेंसरों में से एक को एक प्रतीकात्मक हैंडल लौटाता है। |
सार आउटपुट[] <?> | आउटपुटलिस्ट (int idx, int length) इस ऑपरेशन द्वारा उत्पादित टेंसरों की सूची में प्रतीकात्मक हैंडल लौटाता है। |
सार इंट | आउटपुटलिस्टलंबाई (स्ट्रिंग नाम) इस ऑपरेशन द्वारा उत्पादित टेंसर की सूची का आकार लौटाता है। |
सार स्ट्रिंग | प्रकार () ऑपरेशन का प्रकार लौटाता है, अर्थात, ऑपरेशन द्वारा की गई गणना का नाम। |
सार्वजनिक तरीके
इस ऑपरेशन के लिए टेंसर की दी गई इनपुट सूची का आकार लौटाता है।
एक ऑपरेशन में कई नामित इनपुट होते हैं, जिनमें से प्रत्येक में या तो एक एकल टेंसर या टेंसर की एक सूची होती है। यह विधि ऑपरेशन के विशिष्ट नामित इनपुट के लिए टेंसर की सूची का आकार लौटाती है।
पैरामीटर
नाम | इस ऑपरेशन के लिए टेंसर (जिनमें से कई हो सकते हैं) इनपुट की सूची का पहचानकर्ता। |
---|
रिटर्न
- इस नामित इनपुट द्वारा निर्मित टेंसरों की सूची का आकार।
फेंकता
अवैध तर्क अपवाद | यदि इस ऑपरेशन में दिए गए नाम के साथ कोई इनपुट नहीं है। |
---|
सार्वजनिक सार स्ट्रिंग नाम ()
ऑपरेशन का पूरा नाम लौटाता है।
सार्वजनिक सार int numOutputs ()
इस ऑपरेशन द्वारा उत्पादित टेंसरों की संख्या लौटाता है।
सार्वजनिक सार आउटपुट <T> आउटपुट (int idx)
इस ऑपरेशन द्वारा उत्पादित टेंसरों में से एक को एक प्रतीकात्मक हैंडल लौटाता है।
चेतावनी: यह जांच नहीं करता है कि टेंसर का प्रकार टी से मेल खाता है। इस विधि को अनुमान लगाने की बजाय एक स्पष्ट प्रकार के पैरामीटर के साथ कॉल करने की अनुशंसा की जाती है, उदाहरण के लिए operation.<Integer>output(0)
पैरामीटर
आईडीएक्स | इस ऑपरेशन द्वारा उत्पादित आउटपुट के बीच आउटपुट का सूचकांक। |
---|
सार्वजनिक सार आउटपुट[] <?> आउटपुटलिस्ट (int idx, int length)
इस ऑपरेशन द्वारा उत्पादित टेंसरों की सूची में प्रतीकात्मक हैंडल लौटाता है।
पैरामीटर
आईडीएक्स | सूची के पहले टेंसर का सूचकांक |
---|
लंबाई | सूची में टेंसरों की संख्या |
---|
सार्वजनिक सार पूर्णांक आउटपुट सूची लंबाई (स्ट्रिंग नाम)
इस ऑपरेशन द्वारा उत्पादित टेंसर की सूची का आकार लौटाता है।
एक ऑपरेशन में कई नामित आउटपुट होते हैं, जिनमें से प्रत्येक या तो एक एकल टेंसर या टेंसर की एक सूची उत्पन्न करता है। यह विधि ऑपरेशन के विशिष्ट नामित आउटपुट के लिए टेंसर की सूची का आकार लौटाती है।
पैरामीटर
नाम | इस ऑपरेशन द्वारा उत्पादित टेंसरों (जिनमें से कई हो सकते हैं) की सूची का पहचानकर्ता। |
---|
रिटर्न
- इस नामित आउटपुट द्वारा उत्पादित टेंसर की सूची का आकार।
फेंकता
अवैध तर्क अपवाद | यदि इस ऑपरेशन में दिए गए नाम के साथ कोई आउटपुट नहीं है। |
---|
सार्वजनिक सार स्ट्रिंग प्रकार ()
ऑपरेशन का प्रकार लौटाता है, अर्थात, ऑपरेशन द्वारा की गई गणना का नाम।
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज के कॉन्टेंट को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट की नीतियां देखें. Java, Oracle का और/या इसके तहत काम करने वाली कंपनियों का एक रजिस्टर किया हुआ ट्रेडमार्क है. कुछ कॉन्टेंट को, numpy license के तहत लाइसेंस मिला है.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# Operation\n\npublic interface **Operation** \n\n|---|---|---|\n| Known Indirect Subclasses [GraphOperation](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation) |-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [GraphOperation](/versions/r2.13/api_docs/java/org/tensorflow/GraphOperation) | Implementation for an [Operation](/versions/r2.13/api_docs/java/org/tensorflow/Operation) added as a node to a [Graph](/versions/r2.13/api_docs/java/org/tensorflow/Graph). | |||\n\nPerforms computation on Tensors.\n\nAn Operation takes zero or more [Tensor](/versions/r2.13/api_docs/java/org/tensorflow/Tensor)s (produced by other Operations) as input, and\nproduces zero or more [Tensor](/versions/r2.13/api_docs/java/org/tensorflow/Tensor)s as output.\n\n\u003cbr /\u003e\n\n### Public Methods\n\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract int | [inputListLength](/versions/r2.13/api_docs/java/org/tensorflow/Operation#inputListLength(java.lang.String))(String name) Returns the size of the given inputs list of Tensors for this operation. |\n| abstract String | [name](/versions/r2.13/api_docs/java/org/tensorflow/Operation#name())() Returns the full name of the Operation. |\n| abstract int | [numOutputs](/versions/r2.13/api_docs/java/org/tensorflow/Operation#numOutputs())() Returns the number of tensors produced by this operation. |\n| abstract \\\u003cT\\\u003e [Output](/versions/r2.13/api_docs/java/org/tensorflow/Output)\\\u003cT\\\u003e | [output](/versions/r2.13/api_docs/java/org/tensorflow/Operation#output(int))(int idx) Returns a symbolic handle to one of the tensors produced by this operation. |\n| abstract [Output\\[\\]](/versions/r2.13/api_docs/java/org/tensorflow/Output)\\\u003c?\\\u003e | [outputList](/versions/r2.13/api_docs/java/org/tensorflow/Operation#outputList(int,%20int))(int idx, int length) Returns symbolic handles to a list of tensors produced by this operation. |\n| abstract int | [outputListLength](/versions/r2.13/api_docs/java/org/tensorflow/Operation#outputListLength(java.lang.String))(String name) Returns the size of the list of Tensors produced by this operation. |\n| abstract String | [type](/versions/r2.13/api_docs/java/org/tensorflow/Operation#type())() Returns the type of the operation, i.e., the name of the computation performed by the operation. |\n\nPublic Methods\n--------------\n\n#### public abstract int\n**inputListLength**\n(String name)\n\nReturns the size of the given inputs list of Tensors for this operation.\n\nAn Operation has multiple named inputs, each of which contains either a single tensor or a\nlist of tensors. This method returns the size of the list of tensors for a specific named input\nof the operation.\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| name | identifier of the list of tensors (of which there may be many) inputs to this operation. |\n|------|------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- the size of the list of Tensors produced by this named input. \n\n##### Throws\n\n| IllegalArgumentException | if this operation has no input with the provided name. |\n|--------------------------|--------------------------------------------------------|\n\n#### public abstract String\n**name**\n()\n\nReturns the full name of the Operation. \n\n#### public abstract int\n**numOutputs**\n()\n\nReturns the number of tensors produced by this operation. \n\n#### public abstract [Output](/versions/r2.13/api_docs/java/org/tensorflow/Output)\\\u003cT\\\u003e\n**output**\n(int idx)\n\nReturns a symbolic handle to one of the tensors produced by this operation.\n\nWarning: Does not check that the type of the tensor matches T. It is recommended to call\nthis method with an explicit type parameter rather than letting it be inferred, e.g. `operation.<Integer>output(0)`\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| idx | The index of the output among the outputs produced by this operation. |\n|-----|-----------------------------------------------------------------------|\n\n#### public abstract [Output\\[\\]](/versions/r2.13/api_docs/java/org/tensorflow/Output)\\\u003c?\\\u003e\n**outputList**\n(int idx, int length)\n\nReturns symbolic handles to a list of tensors produced by this operation. \n\n##### Parameters\n\n| idx | index of the first tensor of the list |\n| length | number of tensors in the list |\n|--------|---------------------------------------|\n\n##### Returns\n\n- array of `Output` \n\n#### public abstract int\n**outputListLength**\n(String name)\n\nReturns the size of the list of Tensors produced by this operation.\n\nAn Operation has multiple named outputs, each of which produces either a single tensor or a\nlist of tensors. This method returns the size of the list of tensors for a specific named\noutput of the operation.\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| name | identifier of the list of tensors (of which there may be many) produced by this operation. |\n|------|--------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- the size of the list of Tensors produced by this named output. \n\n##### Throws\n\n| IllegalArgumentException | if this operation has no output with the provided name. |\n|--------------------------|---------------------------------------------------------|\n\n#### public abstract String\n**type**\n()\n\nReturns the type of the operation, i.e., the name of the computation performed by the\noperation."]]