(self, max_len, pad_id)
Pad the encoder input sequence with pad_id up to max_len.
Pad the encoder input sequence with pad_id up to max_len.
Pad the encoder input sequence with pad_id up to max_len .
def pad_encoder_input(self, max_len, pad_id):
    """Pad the encoder input sequence with pad_id up to max_len."""
    while len(self.enc_input) < max_len:
      self.enc_input.append(pad_id)
    if self.hps.pointer_gen:
      while len(self.enc_input_extend_vocab) < max_len:
        self.enc_input_extend_vocab.append(pad_id)
def pad_encoder_input ( self , max_len , pad_id ) : while len ( self . enc_input ) < max_len : self . enc_input . append ( pad_id ) if self . hps . pointer_gen : while len ( self . enc_input_extend_vocab ) < max_len : self . enc_input_extend_vocab . append ( pad_id )