diff --git a/src/torchmetrics/text/perplexity.py b/src/torchmetrics/text/perplexity.py index 81f5c694f99..51804881df8 100644 --- a/src/torchmetrics/text/perplexity.py +++ b/src/torchmetrics/text/perplexity.py @@ -33,8 +33,8 @@ class Perplexity(Metric): As input to ``forward`` and ``update`` the metric accepts the following input: - ``preds`` (:class:`~torch.Tensor`): Logits or a unnormalized score assigned to each token in a sequence with shape - [batch_size, seq_len, vocab_size], which is the output of a language model. Scores will be normalized internally - using softmax. + [batch_size, seq_len, vocab_size], which is the output of a language model. Scores will be normalized internally + using softmax. - ``target`` (:class:`~torch.Tensor`): Ground truth values with a shape [batch_size, seq_len] As output of ``forward`` and ``compute`` the metric returns the following output: