tensorflow:: אופס:: לאסוף

#include <array_ops.h>

אספו פרוסות params לפי indices .

סיכום

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

    # Scalar indices
    output[:, ..., :] = params[indices, :, ... :]

    # Vector indices
    output[i, :, ..., :] = params[indices[i], :, ... :]

    # Higher rank indices
    output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :]

אם indices הם תמורה ו- len(indices) == params.shape[0] אז פעולה זו תשנה params בהתאם.

validate_indices : מודחק. אם פעולה זו מוקצית ל-CPU, ערכים indices מאומתים תמיד להיות בטווח. אם מוקצים ל-GPU, מדדים מחוץ לתחום מביאים להתנהגות בטוחה אך לא מוגדרת, שעשויה לכלול העלאת שגיאה.

טיעונים:

  • scope: אובייקט Scope

החזרות:

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

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

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

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

operation
output

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

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

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

ValidateIndices (bool x)

מבנים

tensorflow:: ops:: לאסוף:: Attrs

מגדירי תכונות אופציונליים עבור Gather .

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

מבצע

Operation operation

תְפוּקָה

::tensorflow::Output output

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

לאסוף

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

לאסוף

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

צוֹמֶת

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

ValidateIndices

Attrs ValidateIndices(
  bool x
)