সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: DepthwiseConv2dNative
#include <nn_ops.h>
4-D input
এবং filter
টেনসর প্রদত্ত একটি 2-D গভীরতার দিক থেকে পরিবর্তিত গণনা করে।
সারাংশ
আকৃতির একটি ইনপুট টেনসর [batch, in_height, in_width, in_channels]
এবং একটি ফিল্টার / কার্নেল আকৃতির টেনসর [filter_height, filter_width, in_channels, channel_multiplier]
depthwise_conv2d
হয়েছে, যার মধ্যে in_channels
কনভোলিউশনাল ফিল্টারগুলি রয়েছে (প্রতিটির জন্য 1টি চ্যানেল থেকে channel_multiplier
চ্যানেলে প্রসারিত হচ্ছে), তারপর ফলাফলগুলিকে একত্রিত করে। এইভাবে, আউটপুটে in_channels * channel_multiplier
চ্যানেল রয়েছে।
for k in 0..in_channels-1
for q in 0..channel_multiplier-1
output[b, i, j, k * channel_multiplier + q] =
sum_{di, dj} input[b, strides[1] * i + di, strides[2] * j + dj, k] *
filter[di, dj, k, q]
strides[0] = strides[3] = 1
থাকতে হবে। একই অনুভূমিক এবং শীর্ষবিন্দু স্ট্রাইডের সবচেয়ে সাধারণ ক্ষেত্রে, strides = [1, stride, stride, 1]
।
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- স্ট্রাইডস: দৈর্ঘ্যের 1-D 4.
input
প্রতিটি মাত্রার জন্য স্লাইডিং উইন্ডোর অগ্রগতি। - প্যাডিং: ব্যবহার করার জন্য প্যাডিং অ্যালগরিদমের ধরন।
ঐচ্ছিক বৈশিষ্ট্য (দেখুন Attrs
):
- data_format: ইনপুট এবং আউটপুট ডেটার ডেটা বিন্যাস উল্লেখ করুন। ডিফল্ট বিন্যাস "NHWC" এর সাথে, ডেটা এই ক্রমে সংরক্ষণ করা হয়: [ব্যাচ, উচ্চতা, প্রস্থ, চ্যানেল]। বিকল্পভাবে, বিন্যাসটি "NCHW" হতে পারে, এর ডেটা স্টোরেজ অর্ডার: [ব্যাচ, চ্যানেল, উচ্চতা, প্রস্থ]।
- প্রসারণ: দৈর্ঘ্যের 1-ডি টেনসর 4.
input
প্রতিটি মাত্রার জন্য প্রসারিত ফ্যাক্টর। k > 1 তে সেট করা হলে, সেই মাত্রার প্রতিটি ফিল্টার উপাদানের মধ্যে k-1 এড়িয়ে যাওয়া ঘর থাকবে। মাত্রার ক্রম data_format
এর মান দ্বারা নির্ধারিত হয়, বিশদ বিবরণের জন্য উপরে দেখুন। ব্যাচের প্রসারণ এবং গভীরতার মাত্রা অবশ্যই 1 হতে হবে।
রিটার্ন:
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
নোড
::tensorflow::Node * node() const
operator::tensorflow::Input() const
অপারেটর::টেনসরফ্লো::আউটপুট
operator::tensorflow::Output() const
পাবলিক স্ট্যাটিক ফাংশন
Attrs DataFormat(
StringPiece x
)
প্রসারণ
Attrs Dilations(
const gtl::ArraySlice< int > & x
)
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# tensorflow::ops::DepthwiseConv2dNative Class Reference\n\ntensorflow::ops::DepthwiseConv2dNative\n======================================\n\n`#include \u003cnn_ops.h\u003e`\n\nComputes a 2-D depthwise convolution given 4-D `input` and `filter` tensors.\n\nSummary\n-------\n\nGiven an input tensor of shape `[batch, in_height, in_width, in_channels]` and a filter / kernel tensor of shape `[filter_height, filter_width, in_channels, channel_multiplier]`, containing `in_channels` convolutional filters of depth 1, `depthwise_conv2d` applies a different filter to each input channel (expanding from 1 channel to `channel_multiplier` channels for each), then concatenates the results together. Thus, the output has `in_channels * channel_multiplier` channels.\n\n\n```scdoc\nfor k in 0..in_channels-1\n for q in 0..channel_multiplier-1\n output[b, i, j, k * channel_multiplier + q] =\n sum_{di, dj} input[b, strides[1] * i + di, strides[2] * j + dj, k] *\n filter[di, dj, k, q]\n```\n\n\u003cbr /\u003e\n\nMust have `strides[0] = strides[3] = 1`. For the most common case of the same horizontal and vertices strides, `strides = [1, stride, stride, 1]`.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- strides: 1-D of length 4. The stride of the sliding window for each dimension of `input`.\n- padding: The type of padding algorithm to use.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/depthwise-conv2d-native/attrs#structtensorflow_1_1ops_1_1_depthwise_conv2d_native_1_1_attrs)):\n\n- data_format: Specify the data format of the input and output data. With the default format \"NHWC\", the data is stored in the order of: \\[batch, height, width, channels\\]. Alternatively, the format could be \"NCHW\", the data storage order of: \\[batch, channels, height, width\\].\n- dilations: 1-D tensor of length 4. The dilation factor for each dimension of `input`. If set to k \\\u003e 1, there will be k-1 skipped cells between each filter element on that dimension. The dimension order is determined by the value of `data_format`, see above for details. Dilations in the batch and depth dimensions must be 1.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The output tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [DepthwiseConv2dNative](#classtensorflow_1_1ops_1_1_depthwise_conv2d_native_1a50c225536301350d0a2a4e15f11bb1e8)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` filter, const gtl::ArraySlice\u003c int \u003e & strides, StringPiece padding)` ||\n| [DepthwiseConv2dNative](#classtensorflow_1_1ops_1_1_depthwise_conv2d_native_1a1403cd12618eaad516b1e553b99a2dec)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` filter, const gtl::ArraySlice\u003c int \u003e & strides, StringPiece padding, const `[DepthwiseConv2dNative::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/depthwise-conv2d-native/attrs#structtensorflow_1_1ops_1_1_depthwise_conv2d_native_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_depthwise_conv2d_native_1af4279f97302c2185f1577d3cee105837) | [Operation](/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_depthwise_conv2d_native_1a787a2254c323c4cc73067daa11e2b646) | `::`[tensorflow::Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_depthwise_conv2d_native_1ab6d86ff41ea2b1ec8b84bd58bda5b4c7)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_depthwise_conv2d_native_1ab08d7fc817e77e96f3d713f9c4536ccd)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_depthwise_conv2d_native_1aaa32a9f3e246eae5adc3000f23eb8e88)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DataFormat](#classtensorflow_1_1ops_1_1_depthwise_conv2d_native_1a51fe0b98bda9604c4dcb4ce5156714df)`(StringPiece x)` | [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/depthwise-conv2d-native/attrs#structtensorflow_1_1ops_1_1_depthwise_conv2d_native_1_1_attrs) |\n| [Dilations](#classtensorflow_1_1ops_1_1_depthwise_conv2d_native_1a36765465f25da5bb2ff97249302c8806)`(const gtl::ArraySlice\u003c int \u003e & x)` | [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/depthwise-conv2d-native/attrs#structtensorflow_1_1ops_1_1_depthwise_conv2d_native_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::DepthwiseConv2dNative::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/depthwise-conv2d-native/attrs) | Optional attribute setters for [DepthwiseConv2dNative](/versions/r2.0/api_docs/cc/class/tensorflow/ops/depthwise-conv2d-native#classtensorflow_1_1ops_1_1_depthwise_conv2d_native). |\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### DepthwiseConv2dNative\n\n```gdscript\n DepthwiseConv2dNative(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input filter,\n const gtl::ArraySlice\u003c int \u003e & strides,\n StringPiece padding\n)\n``` \n\n### DepthwiseConv2dNative\n\n```gdscript\n DepthwiseConv2dNative(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input filter,\n const gtl::ArraySlice\u003c int \u003e & strides,\n StringPiece padding,\n const DepthwiseConv2dNative::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### DataFormat\n\n```text\nAttrs DataFormat(\n StringPiece x\n)\n``` \n\n### Dilations\n\n```gdscript\nAttrs Dilations(\n const gtl::ArraySlice\u003c int \u003e & x\n)\n```"]]