टेंसरफ़्लो:: ऑप्स:: गहराईवारConv2dNative

#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]

तर्क:

  • स्कोप: एक स्कोप ऑब्जेक्ट
  • स्ट्राइड्स: लंबाई का 1-डी 4. input के प्रत्येक आयाम के लिए स्लाइडिंग विंडो का स्ट्राइड।
  • पैडिंग: उपयोग करने के लिए पैडिंग एल्गोरिदम का प्रकार।

वैकल्पिक विशेषताएँ (देखें Attrs ):

  • data_format: इनपुट और आउटपुट डेटा का डेटा प्रारूप निर्दिष्ट करें। डिफ़ॉल्ट प्रारूप "एनएचडब्ल्यूसी" के साथ, डेटा को इस क्रम में संग्रहीत किया जाता है: [बैच, ऊंचाई, चौड़ाई, चैनल]। वैकल्पिक रूप से, प्रारूप "एनसीएचडब्ल्यू" हो सकता है, डेटा भंडारण क्रम: [बैच, चैनल, ऊंचाई, चौड़ाई]।
  • फैलाव: लंबाई का 1-डी टेंसर 4. 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

सार्वजनिक समारोह

गहराईवारConv2dNative

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

गहराईवारConv2dNative

 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
)