From c670b2d533a9070a1c2160b9260ff692b0fa1766 Mon Sep 17 00:00:00 2001 From: SeqIO Team Date: Thu, 28 Mar 2024 10:16:00 -0700 Subject: [PATCH] `scores` is a sequence of floats. PiperOrigin-RevId: 619977729 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38838ee6..c4c9a297 100644 --- a/README.md +++ b/README.md @@ -403,7 +403,7 @@ log-likelihood scores according to the model. The args must be named `targets` and `scores`. ```py -def perplexity(targets: Sequence[str], scores: Sequence[int]): +def perplexity(targets: Sequence[str], scores: Sequence[float]): return { "perplexity": seqio.metrics.Scalar(np.exp(np.mean(scores))) }