#include <candidate_sampling_ops.h>
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.
Arguments:
Optional attributes (see Attrs
):
Returns:
Output
indices: A vector of indices corresponding to rows of true_candidates.Output
ids: A vector of IDs of positions in sampled_candidates that match a true_label for the row with the corresponding index in indices.Output
weights: A vector of the same length as indices and ids, in which each element is -FLOAT_MAX. Constructors and Destructors | |
---|---|
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) |
Public attributes | |
---|---|
ids | |
indices | |
weights |
Public static functions | |
---|---|
Seed(int64 x) | |
Seed2(int64 x) |
Structs | |
---|---|
tensorflow::ops::ComputeAccidentalHits::Attrs | Optional attribute setters for ComputeAccidentalHits. |
::tensorflow::Output ids
::tensorflow::Output indices
::tensorflow::Output weights
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 )
Attrs Seed( int64 x )
Attrs Seed2( int64 x )
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/compute-accidental-hits.html