# SOME DESCRIPTIVE TITLE. # Copyright (C) 2021, PaddleNLP # This file is distributed under the same license as the PaddleNLP package. # FIRST AUTHOR , 2022. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PaddleNLP \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-03-18 21:31+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.0\n" #: ../source/paddlenlp.metrics.perplexity.rst:2 msgid "perplexity" msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity:1 msgid "基类::class:`paddle.metric.metrics.Metric`" msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity:1 msgid "" "Perplexity is a metric used to judge how good a language model is. We can" " define perplexity as the inverse probability of the test set, normalised" " by the number of the words in the test set. Perplexity is calculated " "using cross entropy. It supports both padding data and no padding data." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity:7 msgid "" "If data is not padded, users should provide `seq_len` for `Metric` " "initialization. If data is padded, your label should contain `seq_mask`, " "which indicates the actual length of samples." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity:11 msgid "" "This Perplexity requires that the output of your network is prediction, " "label and sequence length (optional). If the Perplexity here doesn't meet" " your needs, you could override the `compute` or `update` method for " "calculating Perplexity." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity #: paddlenlp.metrics.perplexity.Perplexity.compute #: paddlenlp.metrics.perplexity.Perplexity.update msgid "参数" msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity:16 msgid "" "Sequence length of each sample, it must be provided while data is not " "padded. Defaults to 20." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity:19 msgid "Name of `Metric` instance. Defaults to 'Perplexity'." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity:23 msgid "示例" msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.compute:1 msgid "Computes cross entropy loss." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.compute:3 msgid "" "Predictor tensor, and its dtype is float32 or float64, and has a shape of" " [batch_size, sequence_length, vocab_size]." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.compute:6 msgid "" "Label tensor, and its dtype is int64, and has a shape of [batch_size, " "sequence_length, 1] or [batch_size, sequence_length]." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.compute:9 msgid "" "Sequence mask tensor, and its type could be float32, float64, int32 or " "int64, and has a shape of [batch_size, sequence_length]. It's used to " "calculate loss. Defaults to None." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.accumulate #: paddlenlp.metrics.perplexity.Perplexity.compute #: paddlenlp.metrics.perplexity.Perplexity.name msgid "返回" msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.compute:14 msgid "" "Returns tuple (`ce, word_num`) if `seq_mask` is not None. Otherwise, " "returns tensor `ce`. `ce` it the cross entropy loss, its shape is " "[batch_size, sequence_length] and its data type should be float32." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.accumulate #: paddlenlp.metrics.perplexity.Perplexity.compute #: paddlenlp.metrics.perplexity.Perplexity.name msgid "返回类型" msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.update:1 msgid "Updates metric states." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.update:3 msgid "" "Cross entropy loss, it's calculated by `compute` and converted to " "`numpy.ndarray`." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.update:6 msgid "" "The number of words of sequence, it's calculated by `compute` and " "converted to `numpy.ndarray`. Defaults to None." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.reset:1 msgid "Resets all metric states." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.accumulate:1 msgid "Calculates and returns the value of perplexity." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.accumulate:3 msgid "Returns `perplexity`, the calculation results." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.name:1 msgid "Returns name of the metric instance." msgstr "" #: of paddlenlp.metrics.perplexity.Perplexity.name:3 msgid "The name of the metric instance." msgstr ""