• tf.contrib.gan.eval.classifier_metrics.classifier_score_from_logits
  • tf.contrib.gan.eval.classifier_score_from_logits

Defined in tensorflow/contrib/gan/python/eval/python/

Classifier score for evaluating a generative model from logits.

This method computes the classifier score for a set of logits. This can be used independently of the classifier_score() method, especially in the case of using large batches during evaluation where we would like precompute all of the logits before computing the classifier score.

This technique is described in detail in In summary, this function calculates:

exp( E[ KL(p(y|x) || p(y)) ] )

which captures how different the network's classification prediction is from the prior distribution over classes.


  • logits: Precomputed 2D tensor of logits that will be used to compute the classifier score.


The classifier score. A floating-point scalar of the same type as the output of logits.