tensorflow:: אופס:: PadV2

#include <array_ops.h>

מרפד טנזור.

סיכום

פעולה זו input בהתאם paddings ול- constant_values ​​שאתה מציין. paddings הוא טנזור שלם עם צורה [Dn, 2] , כאשר n הוא דרגת input . עבור כל ממד D של input , paddings[D, 0] מציינים כמה ערכי ריפוד להוסיף לפני תוכן input באותו מימד, וריפודים paddings[D, 1] מציינים כמה ערכי ריפוד להוסיף אחרי תוכן input באותו מימד מֵמַד. constant_values ​​הוא טנסור סקלרי מאותו סוג של input המציין את הערך לשימוש עבור input ריפוד.

הגודל המרופד של כל מימד D של הפלט הוא:

paddings(D, 0) + input.dim_size(D) + paddings(D, 1)

לדוגמה:

# 't' is [[1, 1], [2, 2]]
# 'paddings' is [[1, 1], [2, 2]]
# 'constant_values' is 0
# rank of 't' is 2
pad(t, paddings) ==> [[0, 0, 0, 0, 0, 0]
                      [0, 0, 1, 1, 0, 0]
                      [0, 0, 2, 2, 0, 0]
                      [0, 0, 0, 0, 0, 0]]

טיעונים:

  • scope: אובייקט Scope

החזרות:

  • Output : טנסור הפלט.

בנאים והורסים

PadV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input paddings, :: tensorflow::Input constant_values)

תכונות ציבוריות

operation
output

תפקידים ציבוריים

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

תכונות ציבוריות

מבצע

Operation operation

תְפוּקָה

::tensorflow::Output output

תפקידים ציבוריים

PadV2

 PadV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input paddings,
  ::tensorflow::Input constant_values
)

צוֹמֶת

::tensorflow::Node * node() const 

מפעיל::tensorflow::קלט

 operator::tensorflow::Input() const 

אופרטור::tensorflow::פלט

 operator::tensorflow::Output() const