tf.raw_ops.ComputeAccidentalHits

Computes the ids of the positions in sampled_candidates that match true_labels.

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.

true_classesA Tensor of type int64. The true_classes output of UnpackSparseLabels.
sampled_candidatesA Tensor of type int64. The sampled_candidates output of CandidateSampler.
num_trueAn int. Number of true labels per context.
seedAn optional int. Defaults to 0. 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.
seed2An optional int. Defaults to 0. An second seed to avoid seed collision.
nameA name for the operation (optional).

A tuple of Tensor objects (indices, ids, weights).
indicesA Tensor of type int32.
idsA Tensor of type int64.
weightsA Tensor of type float32.