tf.raw_ops.ComputeAccidentalHits
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
Computes the ids of the positions in sampled_candidates that match true_labels.
tf.raw_ops.ComputeAccidentalHits(
    true_classes, sampled_candidates, num_true, seed=0, seed2=0, name=None
)
When doing log-odds NCE, the result of this op should be passed through a
SparseToDense op, then added to the logits of the sampled candidates. This has
the effect of 'removing' the sampled labels that match the true labels by
making the classifier sure that they are sampled labels.
| Args | 
|---|
| true_classes | A Tensorof typeint64.
The true_classes output of UnpackSparseLabels. | 
| sampled_candidates | A Tensorof typeint64.
The sampled_candidates output of CandidateSampler. | 
| num_true | An int. Number of true labels per context. | 
| seed | An optional int. Defaults to0.
If either seed or seed2 are set to be non-zero, the random number
generator is seeded by the given seed.  Otherwise, it is seeded by a
random seed. | 
| seed2 | An optional int. Defaults to0.
An second seed to avoid seed collision. | 
| name | A name for the operation (optional). | 
| Returns | 
|---|
| A tuple of Tensorobjects (indices, ids, weights). | 
| indices | A Tensorof typeint32. | 
| ids | A Tensorof typeint64. | 
| weights | A Tensorof typefloat32. | 
  
  
 
  
    
    
      
       
    
    
  
  
  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. Some content is licensed under the numpy license.
  Last updated 2022-10-27 UTC.
  
  
  
    
      [null,null,["Last updated 2022-10-27 UTC."],[],[]]