संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: फ़्यूज्डपैडConv2D
#include <nn_ops.h>
कनवल्शन के दौरान प्रीप्रोसेस के रूप में पैडिंग करता है।
सारांश
FusedResizeAndPadConv2d के समान, यह ऑप एक अनुकूलित कार्यान्वयन की अनुमति देता है जहां स्थानिक पैडिंग परिवर्तन चरण को im2col लुकअप के साथ जोड़ा जाता है, लेकिन इस मामले में आकार बदलने के लिए आवश्यक बिलिनियर फ़िल्टरिंग के बिना। पैडिंग को फ़्यूज़ करने से मध्यवर्ती परिणामों को पूरे टेंसर के रूप में लिखने की आवश्यकता नहीं होती है, जिससे मेमोरी दबाव कम हो जाता है, और हम परिवर्तन गणनाओं को मर्ज करके कुछ विलंबता लाभ प्राप्त कर सकते हैं। Conv2D के लिए data_format विशेषता इस ऑप द्वारा समर्थित नहीं है, और इसके बजाय 'NHWC' ऑर्डर का उपयोग किया जाता है। आंतरिक रूप से यह ऑप एकल प्रति-ग्राफ़ स्क्रैच बफ़र का उपयोग करता है, जिसका अर्थ है कि यदि एकाधिक संस्करण समानांतर में चलाए जा रहे हैं तो यह अवरुद्ध हो जाएगा। ऐसा इसलिए है क्योंकि यह ऑपरेटर मुख्य रूप से मेमोरी उपयोग को कम करने के लिए एक अनुकूलन है।
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- इनपुट: आकार के साथ 4-डी
[batch, in_height, in_width, in_channels]
। - पैडिंग: पैडिंग आकार निर्दिष्ट करने वाला दो-स्तंभ मैट्रिक्स। पंक्तियों की संख्या
input
की रैंक के समान होनी चाहिए। - फ़िल्टर: 4-डी आकार के साथ
[filter_height, filter_width, in_channels, out_channels]
। - स्ट्राइड्स: लंबाई का 1-डी 4.
input
के प्रत्येक आयाम के लिए स्लाइडिंग विंडो का स्ट्राइड। प्रारूप के साथ निर्दिष्ट आयाम के समान क्रम में होना चाहिए। - पैडिंग: उपयोग करने के लिए पैडिंग एल्गोरिदम का प्रकार।
रिटर्न:
सार्वजनिक गुण
सार्वजनिक समारोह
नोड
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ऑपरेटर::टेन्सरफ़्लो::आउटपुट
operator::tensorflow::Output() const
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# tensorflow::ops::FusedPadConv2D Class Reference\n\ntensorflow::ops::FusedPadConv2D\n===============================\n\n`#include \u003cnn_ops.h\u003e`\n\nPerforms a padding as a preprocess during a convolution.\n\nSummary\n-------\n\nSimilar to FusedResizeAndPadConv2d, this op allows for an optimized implementation where the spatial padding transformation stage is fused with the im2col lookup, but in this case without the bilinear filtering required for resizing. Fusing the padding prevents the need to write out the intermediate results as whole tensors, reducing memory pressure, and we can get some latency gains by merging the transformation calculations. The data_format attribute for [Conv2D](/versions/r2.1/api_docs/cc/class/tensorflow/ops/conv2-d#classtensorflow_1_1ops_1_1_conv2_d) isn't supported by this op, and 'NHWC' order is used instead. Internally this op uses a single per-graph scratch buffer, which means that it will block if multiple versions are being run in parallel. This is because this operator is primarily an optimization to minimize memory usage.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: 4-D with shape `[batch, in_height, in_width, in_channels]`.\n- paddings: A two-column matrix specifying the padding sizes. The number of rows must be the same as the rank of `input`.\n- filter: 4-D with shape `[filter_height, filter_width, in_channels, out_channels]`.\n- strides: 1-D of length 4. The stride of the sliding window for each dimension of `input`. Must be in the same order as the dimension specified with format.\n- padding: The type of padding algorithm to use.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The output tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [FusedPadConv2D](#classtensorflow_1_1ops_1_1_fused_pad_conv2_d_1a29433f179ebfe80f5713baf602db0fb2)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` paddings, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` filter, StringPiece mode, const gtl::ArraySlice\u003c int \u003e & strides, StringPiece padding)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_fused_pad_conv2_d_1a74eadb05eed0b4ac42f88868b346c2c9) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_fused_pad_conv2_d_1a9b745852fc93e6ac7cad86ed8d30355d) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_fused_pad_conv2_d_1a834a7fdc26dccf20c023a8a8f52aa70c)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_fused_pad_conv2_d_1a041ca6414035fd6c7c4526905e111b55)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_fused_pad_conv2_d_1ab21cc1c1b746da897e2ee793cb9320a4)`() const ` | ` ` ` ` |\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### FusedPadConv2D\n\n```gdscript\n FusedPadConv2D(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input paddings,\n ::tensorflow::Input filter,\n StringPiece mode,\n const gtl::ArraySlice\u003c int \u003e & strides,\n StringPiece padding\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```"]]