tensorflow:: ops:: GatherV2

#include <array_ops.h>

אסוף פרוסות params ציר axis לפי indices .

תַקצִיר

indices חייבים להיות טנזור שלם מכל ממד (בדרך כלל 0-D או 1-D). מייצר טנזור פלט עם הצורה params.shape[:axis] + indices.shape + params.shape[axis + 1:] כאשר:

    # Scalar indices (output is rank(params) - 1).
    output[a_0, ..., a_n, b_0, ..., b_n] =
      params[a_0, ..., a_n, indices, b_0, ..., b_n]

    # Vector indices (output is rank(params)).
    output[a_0, ..., a_n, i, b_0, ..., b_n] =
      params[a_0, ..., a_n, indices[i], b_0, ..., b_n]

    # Higher rank indices (output is rank(params) + rank(indices) - 1).
    output[a_0, ..., a_n, i, ..., j, b_0, ... b_n] =
      params[a_0, ..., a_n, indices[i, ..., j], b_0, ..., b_n]

שים לב שבמעבד, אם נמצא אינדקס מחוץ לגבולות, מוחזרת שגיאה. בכרטיס המסך, אם נמצא אינדקס מחוץ לגבולות, המספר 0 נשמר בערך הפלט המתאים.

ראה גם tf.batch_gather ו- tf.gather_nd .

טיעונים:

  • היקף: אובייקט היקף
  • פרמטרים: הטנזור שממנו יש לאסוף ערכים. חייב להיות לפחות axis + 1 .
  • אינדקסים: טנזור אינדקס. חייב להיות בטווח [0, params.shape[axis]) .
  • ציר: הציר params שממנו יש לאסוף indices . ברירת המחדל היא הממד הראשון. תומך באינדקסים שליליים.

החזרות:

  • Output : ערכים params שנאספו מאינדקסים שניתנו על ידי indices , עם shape params.shape[:axis] + indices.shape + params.shape[axis + 1:] .

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

GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis)
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis, const GatherV2::Attrs & attrs)

מאפיינים ציבוריים

operation
output

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

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

פונקציות סטטיות ציבוריות

BatchDims (int64 x)

מבנים

tensorflow:: ops:: GatherV2:: Attrs

קובעי מאפיינים אופציונליים עבור GatherV2 .

מאפיינים ציבוריים

מִבצָע

Operation operation

תְפוּקָה

::tensorflow::Output output

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

GatherV2

 GatherV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices,
  ::tensorflow::Input axis
)

GatherV2

 GatherV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices,
  ::tensorflow::Input axis,
  const GatherV2::Attrs & attrs
)

צוֹמֶת

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

פונקציות סטטיות ציבוריות

קבוצות דימויים

Attrs BatchDims(
  int64 x
)