tensorflow:: ops:: DepthwiseConv2dNative

#include <nn_ops.h>

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

תַקצִיר

בהינתן טנזור קלט בעל צורה [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] .

טיעונים:

  • היקף: אובייקט היקף
  • צעדים: חד-ממדיים באורך 4. צעדי חלון ההזזה עבור כל ממד של input .
  • ריפוד: סוג אלגוריתם הריפוד שיש להשתמש בו.

מאפיינים אופציונליים (ראה Attrs ):

  • data_format: ציין את פורמט הנתונים של נתוני הקלט והפלט. עם פורמט ברירת המחדל "NHWC", הנתונים מאוחסנים בסדר הבא: [batch, height, width, channels]. לחלופין, הפורמט יכול להיות "NCHW", סדר אחסון הנתונים הבא: [batch, channels, height, width].
  • הרחבות: טנזור חד-ממדי באורך 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
)