tensorflow:: ops:: ComputeAccidentalHits

#include <candidate_sampling_ops.h>

מחשב את המזהים של המיקומים ב-sampled_candidates התואמים ל-true_labels.

תַקצִיר

כאשר מבצעים NCE עם סיכויים לוגריים, יש להעביר את תוצאת הפעולה הזו דרך פעולת SparseToDense, ולאחר מכן להוסיף אותה ללוגיטים של המועמדים שנדגמו. פעולה זו משפיעה על 'הסרת' התוויות שנדגמו שתואמות את התוויות האמיתיות על ידי כך שהמסווג מוודא שהן תוויות שנדגמו.

טיעונים:

  • היקף: אובייקט היקף
  • true_classes: הפלט של true_classes של UnpackSparseLabels.
  • sampled_candidates: הפלט של sampled_candidates של CandidateSampler.
  • num_true: מספר תוויות אמת לכל הקשר.

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

  • seed: אם seed או seed2 מוגדרים כלא אפס, מחולל המספרים האקראיים נזרע על ידי ה-seed הנתון. אחרת, הוא נזרע על ידי seed אקראי.
  • seed2: זרע שני כדי למנוע התנגשות זרעים.

החזרות:

  • אינדקסי Output : וקטור של אינדקסים המתאימים לשורות של true_candidates.
  • Output פלט: וקטור של מזהי מיקומים ב-sampled_candidates התואמים ל-true_label עבור השורה עם האינדקס המתאים ב-indices.
  • Output פלט: וקטור באותו אורך כמו אינדקסים ומזהים, שבו כל אלמנט הוא -FLOAT_MAX.

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

ComputeAccidentalHits (const :: tensorflow::Scope & scope, :: tensorflow::Input true_classes, :: tensorflow::Input sampled_candidates, int64 num_true)
ComputeAccidentalHits (const :: tensorflow::Scope & scope, :: tensorflow::Input true_classes, :: tensorflow::Input sampled_candidates, int64 num_true, const ComputeAccidentalHits::Attrs & attrs)

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

ids
indices
operation
weights

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

Seed (int64 x)
Seed2 (int64 x)

מבנים

tensorflow:: ops:: ComputeAccidentalHits:: Attrs

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

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

מזהים

::tensorflow::Output ids

מדדים

::tensorflow::Output indices

מִבצָע

Operation operation

משקולות

::tensorflow::Output weights

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

חישוב פגיעות מקריות

 ComputeAccidentalHits(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input true_classes,
  ::tensorflow::Input sampled_candidates,
  int64 num_true
)

חישוב פגיעות מקריות

 ComputeAccidentalHits(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input true_classes,
  ::tensorflow::Input sampled_candidates,
  int64 num_true,
  const ComputeAccidentalHits::Attrs & attrs
)

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

זֶרַע

Attrs Seed(
  int64 x
)

זרע2

Attrs Seed2(
  int64 x
)