[ allennlp.training.metrics.perplexity ]
Perplexity is a common metric used for evaluating how well a language model predicts a sample.
Assumes negative log likelihood loss of each batch (base e). Provides the average perplexity of the batches.
| @overrides | def get_metric(self, reset: bool = False) -> float
- The accumulated perplexity.