(self, example_list, hps, vocab)
Turns the example_list into a Batch object.

    Args:
       example_list: List of Example objects
       hps: hyperparameters
       vocab: Vocabulary object
Turns the example_list into a Batch object.
Turns the example_list into a Batch object .
def __init__(self, example_list, hps, vocab):
    """Turns the example_list into a Batch object.

    Args:
       example_list: List of Example objects
       hps: hyperparameters
       vocab: Vocabulary object
    """
    self.pad_id = vocab.word2id(data.PAD_TOKEN) # id of the PAD token used to pad sequences
    self.init_encoder_seq(example_list, hps) # initialize the input to the encoder
    self.init_decoder_seq(example_list, hps) # initialize the input and targets for the decoder
    self.store_orig_strings(example_list)
def __init__ ( self , example_list , hps , vocab ) : self . pad_id = vocab . word2id ( data . PAD_TOKEN ) # id of the PAD token used to pad sequences self . init_encoder_seq ( example_list , hps ) # initialize the input to the encoder self . init_decoder_seq ( example_list , hps ) # initialize the input and targets for the decoder self . store_orig_strings ( example_list )