tensorflow:: אופס:: DepthwiseConv2dNative

#include <nn_ops.h>

מחשב קונבולוציית עומק דו-ממדית בהינתן טנסור input 4-ממד filter .

סיכום

בהינתן טנסור קלט של צורה [batch, in_height, in_width, in_channels] וטנסור מסנן / ליבה של צורה [filter_height, filter_width, in_channels, channel_multiplier] , המכיל מסנני קונבולוציוני ב- in_channels של עומק 1, 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] .

טיעונים:

  • scope: אובייקט Scope
  • צעדים: 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
)