זרימת טנסור :: אופ :: LogUniformCandidateSampler
#include <candidate_sampling_ops.h>
מייצר תוויות לדגימת מועמדים עם הפצה אחידה ביומן.
סיכום
ראה הסברים על דגימת מועמדים ופורמטי הנתונים ב- go / מועמד-דגימה.
עבור כל אצווה, אפשרות זו בוחרת קבוצה אחת של תוויות מועמדים שנדגמו.
היתרונות של דגימת מועמדים לכל אצווה הם פשטות ואפשרות לכפל מטריקס צפוף יעיל. החיסרון הוא שיש לבחור את המועמדים שנדגמו ללא תלות בהקשר ובתוויות האמיתיות.
טענות:
- היקף: אובייקט Scope
- true_classes: מטריצת batch_size * num_true, שבה כל שורה מכילה את המזהים של מספר_ target_classes מספר_תווית בתווית המקורית המתאימה.
- מספר_אמת: מספר התוויות האמיתיות לכל הקשר.
- מספר_דגימה: מספר המועמדים לדגימה אקראית.
- ייחודי: אם ייחודי הוא נכון, אנו מדגמים עם דחייה, כך שכל המועמדים שנדגמו באצווה יהיו ייחודיים. זה דורש קירוב מסוים כדי לאמוד את ההסתברות לדגימה לאחר הדחייה.
- range_max: הדגימה תדגום מספרים שלמים מהמרווח [0, range_max).
תכונות אופציונליות (ראה Attrs
):
- זרע: אם זרעים או זרעים 2 מוגדרים כלא אפסיים, מחולל המספרים האקראיים נזרע על ידי הזרע הנתון. אחרת, הוא נזרע על ידי זרע אקראי.
- seed2: זרע שני כדי למנוע התנגשות זרעים.
החזרות:
-
Output
sampled_candidates: וקטור באורך num_sampled, שבו כל אלמנט הוא המזהה של מועמד שנדגם. -
Output
נכון_צפוי_ספירה: מטריצה אצווה_גודל * מספר_אמיתית, המייצגת את מספר הפעמים שכל מועמד צפוי להתרחש אצווה של מועמדים שנדגמו. אם ייחודי = נכון, זוהי הסתברות. -
Output
sampled_expected_count: וקטור באורך num_sampled, עבור כל מועמד שנדגם המייצג את מספר הפעמים שהמועמד צפוי להתרחש במערך מועמדים שנדגמו. אם ייחודי = נכון, זוהי הסתברות.
קונסטרוקטורים ומשחתנים | |
---|---|
LogUniformCandidateSampler (const :: tensorflow::Scope & scope, :: tensorflow::Input true_classes, int64 num_true, int64 num_sampled, bool unique, int64 range_max) | |
LogUniformCandidateSampler (const :: tensorflow::Scope & scope, :: tensorflow::Input true_classes, int64 num_true, int64 num_sampled, bool unique, int64 range_max, const LogUniformCandidateSampler::Attrs & attrs) |
תכונות ציבוריות | |
---|---|
operation | |
sampled_candidates | |
sampled_expected_count | |
true_expected_count |
פונקציות סטטיות ציבוריות | |
---|---|
Seed (int64 x) | |
Seed2 (int64 x) |
סטרוקטורים | |
---|---|
tensorflow :: ops :: LogUniformCandidateSampler :: Attrs | קובעי תכונות אופציונליים עבור LogUniformCandidateSampler . |
תכונות ציבוריות
מבצע
014 bee0320מועמדים מדוגמים
::tensorflow::Output sampled_candidates
מספר מדגם_צפוי_
::tensorflow::Output sampled_expected_count
מספר_אמיתי_צפוי
::tensorflow::Output true_expected_count
פונקציות ציבוריות
LogUniformCandidateSampler
LogUniformCandidateSampler( const ::tensorflow::Scope & scope, ::tensorflow::Input true_classes, int64 num_true, int64 num_sampled, bool unique, int64 range_max )
LogUniformCandidateSampler
LogUniformCandidateSampler( const ::tensorflow::Scope & scope, ::tensorflow::Input true_classes, int64 num_true, int64 num_sampled, bool unique, int64 range_max, const LogUniformCandidateSampler::Attrs & attrs )
פונקציות סטטיות ציבוריות
זֶרַע
Attrs Seed( int64 x )
זרע 2
Attrs Seed2( int64 x )
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-04-20 UTC.