tf.random.all_candidate_sampler
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
Generate the set of all classes.
tf.random.all_candidate_sampler(
    true_classes, num_true, num_sampled, unique, seed=None, name=None
)
Deterministically generates and returns the set of all possible classes.
For testing purposes.  There is no need to use this, since you might as
well use full softmax or full logistic regression.
| Args | 
|---|
| true_classes | A Tensorof typeint64and shape[batch_size,
num_true]. The target classes. | 
| num_true | An int.  The number of target classes per training example. | 
| num_sampled | An int.  The number of possible classes. | 
| unique | A bool. Ignored.
unique. | 
| seed | An int. An operation-specific seed. Default is 0. | 
| name | A name for the operation (optional). | 
| Returns | 
|---|
| sampled_candidates | A tensor of type int64and shape[num_sampled].
This operation deterministically returns the entire range[0, num_sampled]. | 
| true_expected_count | A tensor of type float.  Same shape astrue_classes. The expected counts under the sampling distribution
of each oftrue_classes. All returned values are 1.0. | 
| sampled_expected_count | A tensor of type float. Same shape assampled_candidates. The expected counts under the sampling distribution
of each ofsampled_candidates. All returned values are 1.0. | 
  
  
 
  
    
    
      
       
    
    
  
  
  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 2023-10-06 UTC.
  
  
  
    
      [null,null,["Last updated 2023-10-06 UTC."],[],[]]