def handle(self,
               t_input: inference.TranslatorInput,
               t_output: inference.TranslatorOutput,
               t_walltime: float = 0.):
        """
        :param t_input: Translator input.
        :param t_output: Translator output.
        :param t_walltime: Total wall-clock time for translation.
        """
        plot_attention(t_output.attention_matrix,
                       t_input.tokens,
                       t_output.tokens,
                       "%s_%s.png" % (self.plot_prefix, t_input.sentence_id))
def handle ( self , t_input : inference . TranslatorInput , t_output : inference . TranslatorOutput , t_walltime : float = 0. ) : plot_attention ( t_output . attention_matrix , t_input . tokens , t_output . tokens , "%s_%s.png" % ( self . plot_prefix , t_input . sentence_id ) )
:param t_input: Translator input.
        :param t_output: Translator output.
        :param t_walltime: Total wall-clock time for translation.