تينسورفلو :: العمليات :: ComputeAccidentalHits
#include <candidate_sampling_ops.h>
لحساب معرفات المواضع في sampled_candidates التي تطابق true_labels.
ملخص
عند القيام بـ log-odds NCE ، يجب تمرير نتيجة هذا المرجع من خلال عملية SparseToDense ، ثم إضافتها إلى سجلات المرشحين الذين تم أخذ عينات منهم. هذا له تأثير "إزالة" التسميات التي تم أخذ عينات منها والتي تتطابق مع التسميات الحقيقية عن طريق التأكد من أن المصنف يتأكد من أنها تسميات عينات.
الحجج:
- النطاق: كائن النطاق
- true_classes: إخراج true_classes لـ UnpackSparseLabels.
- sampled_candidates: إخراج sampled_candidates من CandidateSampler.
- num_true: عدد التسميات الحقيقية لكل سياق.
السمات الاختيارية (انظر Attrs
):
- البذرة: إذا تم ضبط البذرة أو البذرة 2 على أن تكون غير صفرية ، فإن مولد الأرقام العشوائية يُبذر بواسطة البذرة المحددة. خلاف ذلك ، يتم بذرها بواسطة بذرة عشوائية.
- seed2: بذرة ثانية لتجنب اصطدام البذور.
عائدات:
- مؤشرات
Output
: متجه من الفهارس المقابلة لصفوف المرشحين الحقيقيين. - معرفات
Output
: متجه لمعرفات المناصب في sampled_candidates التي تتطابق مع true_label للصف مع الفهرس المقابل في المؤشرات. - أوزان
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
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 )
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.