tensorflow:: אופס:: ComputeAccidentalHits

#include <candidate_sampling_ops.h>

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

סיכום

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

טיעונים:

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

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

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

החזרות:

  • מדדי Output : וקטור של מדדים התואם לשורות של מועמדים אמיתיים.
  • Output : וקטור של מזהים של מיקומים ב- sampled_candidates התואמים תווית_true עבור השורה עם האינדקס המתאים במדדים.
  • משקלי 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 .

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

id

::tensorflow::Output ids

מדדים

::tensorflow::Output indices

מבצע

Operation operation

משקולות

::tensorflow::Output weights

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

ComputeAccidentalHits

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

ComputeAccidentalHits

 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
)