Skip to content

Commit

Permalink
scores is a sequence of floats.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 619977729
  • Loading branch information
SeqIO Team authored and SeqIO committed Mar 28, 2024
1 parent 7df80e1 commit c670b2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
}
Expand Down

0 comments on commit c670b2d

Please sign in to comment.