Google I/O में ट्यूनिंग के लिए धन्यवाद। मांग पर सभी सत्र देखें मांग पर देखें

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

#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 की convolutional फिल्टर, 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]

तर्क:

  • गुंजाइश: एक स्कोप ऑब्जेक्ट
  • strides: 1-D लंबाई का 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

सार्वजनिक कार्य

गहराई

 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
)