تدفق التوتر:: العمليات:: DepthwiseConv2dNative

#include <nn_ops.h>

يحسب التلافيف العميق ثنائي الأبعاد input رباعية الأبعاد وموترات filter .

ملخص

بالنظر إلى موتر الإدخال للشكل [batch, in_height, in_width, in_channels] وموتر المرشح/النواة للشكل [filter_height, filter_width, in_channels, channel_multiplier] ، الذي يحتوي على مرشحات تلافيفية in_channels بعمق 1، يطبق 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] .

الحجج:

  • النطاق: كائن النطاق
  • الخطوات: 1-D الطول 4. خطوة النافذة المنزلقة لكل بُعد من أبعاد input .
  • الحشو: نوع خوارزمية الحشو المستخدمة.

السمات الاختيارية (انظر Attrs ):

  • data_format: تحديد تنسيق البيانات لبيانات الإدخال والإخراج. باستخدام التنسيق الافتراضي "NHWC"، يتم تخزين البيانات بالترتيب التالي: [الدفعة، الارتفاع، العرض، القنوات]. وبدلاً من ذلك، يمكن أن يكون التنسيق "NCHW"، ترتيب تخزين البيانات: [دفعة، قنوات، ارتفاع، عرض].
  • التوسعات: موتر 1-D للطول 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)

الهياكل

Tensorflow:: ops:: DepthwiseConv2dNative:: Attrs

محددات السمات الاختيارية لـ DepthwiseConv2dNative .

الصفات العامة

عملية

Operation operation

انتاج

::tensorflow::Output output

الوظائف العامة

DepthwiseConv2dNative

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

DepthwiseConv2dNative

 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 

المشغل::tensorflow::الإدخال

 operator::tensorflow::Input() const 

المشغل::tensorflow::الإخراج

 operator::tensorflow::Output() const 

وظائف ثابتة العامة

تنسيق البيانات

Attrs DataFormat(
  StringPiece x
)

التوسعات

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