टेन्सरफ्लो::ऑप्स::कंप्यूटएक्सीडेंटलहिट्स

#include <candidate_sampling_ops.h>

sampled_candidates में उन पदों की आईडी की गणना करता है जो true_labels से मेल खाते हैं।

सारांश

लॉग-ऑड्स एनसीई करते समय, इस ऑपरेशन के परिणाम को स्पार्स टू डेंस ऑपरेशन से गुजारना चाहिए, फिर इसे सैंपल किए गए उम्मीदवारों के लॉजिट्स में जोड़ना चाहिए। इससे क्लासिफायर को यह सुनिश्चित करने में मदद मिलती है कि वे सैंपल किए गए लेबल हैं, जिससे सही लेबल से मेल खाने वाले सैंपल किए गए लेबल 'हटा दिए' जाते हैं।

तर्क:

  • स्कोप: एक स्कोप ऑब्जेक्ट
  • true_classes: UnpackSparseLabels का true_classes आउटपुट।
  • sampled_candidates: CandidateSampler का sampled_candidates आउटपुट।
  • num_true: प्रति संदर्भ सही लेबलों की संख्या।

वैकल्पिक विशेषताएँ (देखें Attrs ):

  • सीड: यदि सीड या सीड2 में से कोई भी मान शून्य नहीं है, तो रैंडम नंबर जनरेटर को दिए गए सीड से सीड किया जाता है। अन्यथा, इसे एक रैंडम सीड से सीड किया जाता है।
  • seed2: सीड टकराव से बचने के लिए एक दूसरा सीड।

प्रतिफल:

  • Output इंडेक्स: सही उम्मीदवारों की पंक्तियों के अनुरूप इंडेक्स का एक वेक्टर।
  • Output आईडी: सैंपल किए गए उम्मीदवारों में उन पदों की आईडी का एक वेक्टर जो इंडेक्स में संबंधित इंडेक्स वाली पंक्ति के लिए ट्रू लेबल से मेल खाते हैं।
  • 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)

संरचनाएँ

टेन्सरफ्लो::ऑप्स::कंप्यूटएक्सीडेंटलहिट्स::एट्रिब्यूट्स

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
)