Aliases:
tf.nn.all_candidate_sampler
tf.random.all_candidate_sampler
tf.random.all_candidate_sampler(
true_classes,
num_true,
num_sampled,
unique,
seed=None,
name=None
)
Defined in tensorflow/python/ops/candidate_sampling_ops.py
.
Generate the set of all classes.
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
: ATensor
of typeint64
and shape[batch_size, num_true]
. The target classes.num_true
: Anint
. The number of target classes per training example.num_sampled
: Anint
. The number of possible classes.unique
: Abool
. Ignored. unique.seed
: Anint
. An operation-specific seed. Default is 0.name
: A name for the operation (optional).
Returns:
sampled_candidates
: A tensor of typeint64
and shape[num_sampled]
. This operation deterministically returns the entire range[0, num_sampled]
.true_expected_count
: A tensor of typefloat
. 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 typefloat
. Same shape assampled_candidates
. The expected counts under the sampling distribution of each ofsampled_candidates
. All returned values are 1.0.