tensorflow:: ops:: DepthwiseConv2dNative

#include <nn_ops.h>

৪-মাত্রিক input এবং filter টেনসর দেওয়া থাকলে একটি ২-মাত্রিক গভীরতাভিত্তিক কনভোলিউশন গণনা করে।

সারসংক্ষেপ

[batch, in_height, in_width, in_channels] আকারের একটি ইনপুট টেনসর এবং [filter_height, filter_width, in_channels, channel_multiplier] আকারের একটি ফিল্টার / কার্নেল টেনসর দেওয়া থাকলে, যেখানে ১ ডেপথের in_channels সংখ্যক কনভোলিউশনাল ফিল্টার থাকে, depthwise_conv2d প্রতিটি ইনপুট চ্যানেলে একটি ভিন্ন ফিল্টার প্রয়োগ করে (প্রতিটির জন্য ১টি চ্যানেল থেকে 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] ।

যুক্তি:

  • স্কোপ: একটি স্কোপ অবজেক্ট
  • স্ট্রাইড: ৪ দৈর্ঘ্যের ১-মাত্রিক। input প্রতিটি ডাইমেনশনের জন্য স্লাইডিং উইন্ডোর স্ট্রাইড।
  • প্যাডিং: কোন ধরনের প্যাডিং অ্যালগরিদম ব্যবহার করা হবে।

ঐচ্ছিক অ্যাট্রিবিউটসমূহ (দেখুন Attrs ):

  • ডেটা_ফরম্যাট: ইনপুট এবং আউটপুট ডেটার ফরম্যাট নির্দিষ্ট করুন। ডিফল্ট ফরম্যাট "NHWC"-তে, ডেটা এই ক্রমে সংরক্ষিত হয়: [ব্যাচ, উচ্চতা, প্রস্থ, চ্যানেল]। বিকল্পভাবে, ফরম্যাটটি "NCHW" হতে পারে, যেখানে ডেটা সংরক্ষণের ক্রম হলো: [ব্যাচ, চ্যানেল, উচ্চতা, প্রস্থ]।
  • ডাইলেশন: ৪ দৈর্ঘ্যের একটি ১-ডি টেনসর। এটি input প্রতিটি ডাইমেনশনের জন্য ডাইলেশন ফ্যাক্টর। যদি এর মান k > 1 সেট করা হয়, তাহলে সেই ডাইমেনশনের প্রতিটি ফিল্টার এলিমেন্টের মধ্যে k-1 টি সেল বাদ দেওয়া হবে। ডাইমেনশনের ক্রম data_format এর মান দ্বারা নির্ধারিত হয়, বিস্তারিত জানতে উপরে দেখুন। ব্যাচ এবং ডেপথ ডাইমেনশনে ডাইলেশন অবশ্যই ১ হতে হবে।

ফেরত:

  • Output : আউটপুট টেনসর।

নির্মাতা এবং ধ্বংসকারী

DepthwiseConv2dNative (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding)
DepthwiseConv2dNative (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding, const DepthwiseConv2dNative::Attrs & attrs)

জনসাধারণের বৈশিষ্ট্য

operation
output

জনসাধারণের কার্যাবলী

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

পাবলিক স্ট্যাটিক ফাংশন

DataFormat (StringPiece x)
Dilations (const gtl::ArraySlice< int > & x)

কাঠামো

tensorflow:: ops:: DepthwiseConv2dNative:: Attrs

DepthwiseConv2dNative-এর জন্য ঐচ্ছিক অ্যাট্রিবিউট সেটার।

জনসাধারণের বৈশিষ্ট্য

অপারেশন

Operation operation

আউটপুট

::tensorflow::Output output

জনসাধারণের কার্যাবলী

ডেপথওয়াইজকনভ২ডিনেটিভ

 DepthwiseConv2dNative(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input filter,
  const gtl::ArraySlice< int > & strides,
  StringPiece padding
)

ডেপথওয়াইজকনভ২ডিনেটিভ

 DepthwiseConv2dNative(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input filter,
  const gtl::ArraySlice< int > & strides,
  StringPiece padding,
  const DepthwiseConv2dNative::Attrs & attrs
)

নোড

::tensorflow::Node * node() const 

অপারেটর::টেনসরফ্লো::ইনপুট

 operator::tensorflow::Input() const 

অপারেটর::টেনসরফ্লো::আউটপুট

 operator::tensorflow::Output() const 

পাবলিক স্ট্যাটিক ফাংশন

ডেটা ফরম্যাট

Attrs DataFormat(
  StringPiece x
)

প্রসারণ

Attrs Dilations(
  const gtl::ArraySlice< int > & x
)