সেন্সরফ্লো :: অপস :: ডিপথওয়াইজ কনভ 2 ডি নেটিভ
#include <nn_ops.h>
4-ডি input
এবং filter
টেনারগুলিকে দেওয়া 2-ডি গভীরতার দিকের সমাবর্তনকে গণনা করে।
সারসংক্ষেপ
আকারের একটি ইনপুট টেনসর [batch, in_height, in_width, in_channels]
এবং একটি ফিল্টার / কার্নেল টেন্সর দেওয়া হয়েছে [filter_height, filter_width, in_channels, channel_multiplier]
, in_channels
গভীরতা 1 এর in_channels
ফিল্টারগুলি অন্তর্ভুক্ত করে, depthwise_conv2d
প্রতিটি depthwise_conv2d
আলাদা ফিল্টার প্রয়োগ করে (প্রত্যেকের জন্য 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[0] = strides[3] = 1
। একই আনুভূমিক এবং শীর্ষ প্রান্তের সর্বাধিক সাধারণ ক্ষেত্রে strides = [1, stride, stride, 1]
।
যুক্তি:
- সুযোগ: একটি স্কোপ অবজেক্ট
- পদক্ষেপ: দৈর্ঘ্য 4. প্রতিটি আয়তনের জন্য সহচরী উইন্ডোর দীর্ঘ 1-ডি
input
। - প্যাডিং: প্যাডিং অ্যালগরিদমের ধরণটি।
- ডেটা_ফর্ম্যাট: ইনপুট এবং আউটপুট ডেটার ডেটা ফর্ম্যাট উল্লেখ করুন। ডিফল্ট ফর্ম্যাট "এনএইচডব্লিউসি" এর সাথে, ডেটাগুলি এর ক্রমে সংরক্ষণ করা হয়: [ব্যাচ, উচ্চতা, প্রস্থ, চ্যানেল] বিকল্পভাবে, ফর্ম্যাটটি "এনসিএইচডাব্লু" হতে পারে, এর ডেটা স্টোরেজ ক্রম: [ব্যাচ, চ্যানেল, উচ্চতা, প্রস্থ]।
- প্রসারণ: দৈর্ঘ্যের 1-ডি সেন্সর 4
input
প্রতিটি মাত্রার জন্য পরিসর ফ্যাক্টর। যদি কে> 1 তে সেট করা থাকে, সেই মাত্রায় প্রতিটি ফিল্টার উপাদানগুলির মধ্যে k-1 এড়িয়ে যাওয়া ঘর থাকবে। মাত্রাdata_format
মান দ্বারা নির্ধারিত হয়,data_format
জন্য উপরে দেখুন। ব্যাচে ডায়ালেশন এবং গভীরতার মাত্রা 1 হতে হবে।
রিটার্নস:
-
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) |
স্ট্রাক্টস | |
---|---|
টেনসরফ্লো :: অপ্স :: ডিপথওয়াইস কনভ 2 ডি নেটিভ :: অ্যাটারস | DepthwiseConv2dNative এর জন্য alচ্ছিক অ্যাট্রিবিউট সেটটার । |
জনসাধারণের গুণাবলী
অপারেশন
Operation operation
আউটপুট
::tensorflow::Output output
পাবলিক ফাংশন
ডিপথওয়াইজ কনভ 2 ডি নেটিভ
DepthwiseConv2dNative( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding )
ডিপথওয়াইজ কনভ 2 ডি নেটিভ
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 )