torch.distributions.Distribution.perplexity
Distribution.perplexity(): TensorCompute perplexity of the distribution: exp(entropy()).
Returns
Tensor– Perplexity tensor of shape batch_shapeDistribution.perplexity(): TensorCompute perplexity of the distribution: exp(entropy()).
Tensor– Perplexity tensor of shape batch_shape