टेन्सरफ्लो::ऑप्स::डेप्थवाइजकन्व2डीनेटिव
#include <nn_ops.h> यह 4-डी input और filter टेंसर दिए जाने पर 2-डी डेप्थवाइज कनवोल्यूशन की गणना करता है।
सारांश
[batch, in_height, in_width, in_channels] आकार के इनपुट टेंसर और [filter_height, filter_width, in_channels, channel_multiplier] आकार के फ़िल्टर/कर्नेल टेंसर को देखते हुए, जिसमें गहराई 1 के in_channels कनवोल्यूशनल फ़िल्टर होते हैं, 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 = [1, stride, stride, 1] ।
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- स्ट्राइड्स: लंबाई 4 का 1-डी।
inputके प्रत्येक आयाम के लिए स्लाइडिंग विंडो का स्ट्राइड। - पैडिंग: उपयोग किए जाने वाले पैडिंग एल्गोरिदम का प्रकार।
वैकल्पिक विशेषताएँ (देखें Attrs ):
- data_format: इनपुट और आउटपुट डेटा का डेटा फॉर्मेट निर्दिष्ट करें। डिफ़ॉल्ट फॉर्मेट "NHWC" में, डेटा [बैच, ऊंचाई, चौड़ाई, चैनल] के क्रम में संग्रहीत होता है। वैकल्पिक रूप से, फॉर्मेट "NCHW" हो सकता है, जिसमें डेटा [बैच, चैनल, ऊंचाई, चौड़ाई] के क्रम में संग्रहीत होता है।
- डाइलेशन: लंबाई 4 का 1-D टेंसर।
inputके प्रत्येक आयाम के लिए डाइलेशन कारक। यदि इसे k > 1 पर सेट किया जाता है, तो उस आयाम पर प्रत्येक फ़िल्टर तत्व के बीच k-1 छोड़े गए सेल होंगे। आयाम क्रम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 के लिए वैकल्पिक विशेषता निर्धारक। |
सार्वजनिक विशेषताएँ
संचालन
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 )