def get_teacher_forcing_metric(self, gen_log_prob_key="gen_log_prob", invalid_vocab=False):
        '''Get metrics for teacher-forcing.

        It contains:

        * :class:`.metric.PerplexityMetric`

        Arguments:
            gen_log_prob_key (str):  The key of predicted log probability over words.
                Refer to :class:`.metric.PerplexityMetric`. Default: ``gen_log_prob``.
            invalid_vocab (bool): Whether ``gen_log_prob`` contains invalid vocab.
                Refer to :class:`.metric.PerplexityMetric`. Default: ``False``.


        Returns:
            A :class:`.metric.MetricChain` object.
        '''
        metric = MetricChain()
        metric.add_metric(
            PerplexityMetric(self, reference_allvocabs_key="resp_allvocabs", reference_len_key="resp_length",
                             gen_log_prob_key=gen_log_prob_key, invalid_vocab=invalid_vocab))
        return metric
Get metrics for teacher-forcing.

        It contains:

        * :class:`.metric.PerplexityMetric`

        Arguments:
            gen_log_prob_key (str):  The key of predicted log probability over words.
                Refer to :class:`.metric.PerplexityMetric`. Default: ``gen_log_prob``.
            invalid_vocab (bool): Whether ``gen_log_prob`` contains invalid vocab.
                Refer to :class:`.metric.PerplexityMetric`. Default: ``False``.


        Returns:
            A :class:`.metric.MetricChain` object.
        
benchmark/membertret/myCoTK/dataloader/multi_turn_dialog.py