(self, example_list, hps)
Initializes the following:
        self.dec_batch:
          numpy array of shape (batch_size, max_dec_steps), containing integer ids as input for the decoder, padded to max_dec_steps length.
        self.target_batch:
          numpy array of shape (batch_size, max_dec_steps), containing integer ids for the target sequence, padded to max_dec_steps length.
        self.dec_padding_mask:
          numpy array of shape (batch_size, max_dec_steps), containing 1s and 0s. 1s correspond to real tokens in dec_batch and target_batch; 0s correspond to padding.
Initializes the following:
        self.dec_batch:
          numpy array of shape (batch_size, max_dec_steps), containing integer ids as input for the decoder, padded to max_dec_steps length.
        self.target_batch:
          numpy array of shape (batch_size, max_dec_steps), containing integer ids for the target sequence, padded to max_dec_steps length.
        self.dec_padding_mask:
          numpy array of shape (batch_size, max_dec_steps), containing 1s and 0s. 1s correspond to real tokens in dec_batch and target_batch; 0s correspond to padding.
Initializes the following : self . dec_batch : numpy array of shape ( batch_size max_dec_steps ) containing integer ids as input for the decoder padded to max_dec_steps length . self . target_batch : numpy array of shape ( batch_size max_dec_steps ) containing integer ids for the target sequence padded to max_dec_steps length . self . dec_padding_mask : numpy array of shape ( batch_size max_dec_steps ) containing 1s and 0s . 1s correspond to real tokens in dec_batch and target_batch ; 0s correspond to padding .
def init_decoder_seq(self, example_list, hps):
    """Initializes the following:
        self.dec_batch:
          numpy array of shape (batch_size, max_dec_steps), containing integer ids as input for the decoder, padded to max_dec_steps length.
        self.target_batch:
          numpy array of shape (batch_size, max_dec_steps), containing integer ids for the target sequence, padded to max_dec_steps length.
        self.dec_padding_mask:
          numpy array of shape (batch_size, max_dec_steps), containing 1s and 0s. 1s correspond to real tokens in dec_batch and target_batch; 0s correspond to padding.
        """
    # Pad the inputs and targets
    for ex in example_list:
      ex.pad_decoder_inp_targ(hps.max_dec_steps, self.pad_id)

    # Initialize the numpy arrays.
    # Note: our decoder inputs and targets must be the same length for each batch (second dimension = max_dec_steps) because we do not use a dynamic_rnn for decoding. However I believe this is possible, or will soon be possible, with Tensorflow 1.0, in which case it may be best to upgrade to that.
    self.dec_batch = np.zeros((hps.batch_size, hps.max_dec_steps), dtype=np.int32)
    self.target_batch = np.zeros((hps.batch_size, hps.max_dec_steps), dtype=np.int32)
    self.dec_padding_mask = np.zeros((hps.batch_size, hps.max_dec_steps), dtype=np.float32)

    # Fill in the numpy arrays
    for i, ex in enumerate(example_list):
      self.dec_batch[i, :] = ex.dec_input[:]
      self.target_batch[i, :] = ex.target[:]
      for j in xrange(ex.dec_len):
        self.dec_padding_mask[i][j] = 1
def init_decoder_seq ( self , example_list , hps ) : # Pad the inputs and targets for ex in example_list : ex . pad_decoder_inp_targ ( hps . max_dec_steps , self . pad_id ) # Initialize the numpy arrays. # Note: our decoder inputs and targets must be the same length for each batch (second dimension = max_dec_steps) because we do not use a dynamic_rnn for decoding. However I believe this is possible, or will soon be possible, with Tensorflow 1.0, in which case it may be best to upgrade to that. self . dec_batch = np . zeros ( ( hps . batch_size , hps . max_dec_steps ) , dtype = np . int32 ) self . target_batch = np . zeros ( ( hps . batch_size , hps . max_dec_steps ) , dtype = np . int32 ) self . dec_padding_mask = np . zeros ( ( hps . batch_size , hps . max_dec_steps ) , dtype = np . float32 ) # Fill in the numpy arrays for i , ex in enumerate ( example_list ) : self . dec_batch [ i , : ] = ex . dec_input [ : ] self . target_batch [ i , : ] = ex . target [ : ] for j in xrange ( ex . dec_len ) : self . dec_padding_mask [ i ] [ j ] = 1