def normalize_example(self, task, example, encoder, hparams, is_infer):
    """Normalize the examples from different tasks so they can be merged."""
    # Here we use the default function for NLP tasks that makes everything
    # a part of "targets" feature. Override in your subclasses for other uses.
    vocab_offset = encoder.vocab_size + len(self.task_list)
    return normalize_example_nlp(
        task, example, is_infer, self.vocab_type, vocab_offset,
        hparams.multiproblem_max_input_length,
        hparams.multiproblem_max_target_length,
        hparams.multiproblem_fixed_train_length)
def normalize_example ( self , task , example , encoder , hparams , is_infer ) : vocab_offset = encoder . vocab_size + len ( self . task_list ) return normalize_example_nlp ( task , example , is_infer , self . vocab_type , vocab_offset , hparams . multiproblem_max_input_length , hparams . multiproblem_max_target_length , hparams . multiproblem_fixed_train_length )
Normalize the examples from different tasks so they can be merged.