'Returns a batch of inputs for seq2seq attention model.
Returns:
enc_batch: A batch of encoder inputs [batch_size, hps.enc_timestamps].
dec_batch: A batch of decoder inputs [batch_size, hps.dec_timestamps].
target_batch: A batch of targets [batch_size, hps.dec_timestamps].
enc_input_len: encoder input lengths of the batch.
dec_input_len: decoder input lengths of the batch.
loss_weights: weights for loss function, 1 if not padded, 0 if padded.
origin_articles: original article words.
origin_abstracts: original abstract words.'

def NextBatch(self):

    enc_batch = np.zeros((self._hps.batch_size, self._hps.enc_timesteps), dtype=np.int32)
    enc_input_lens = np.zeros(self._hps.batch_size, dtype=np.int32)
    dec_batch = np.zeros((self._hps.batch_size, self._hps.dec_timesteps), dtype=np.int32)
    dec_output_lens = np.zeros(self._hps.batch_size, dtype=np.int32)
    target_batch = np.zeros((self._hps.batch_size, self._hps.dec_timesteps), dtype=np.int32)
    loss_weights = np.zeros((self._hps.batch_size, self._hps.dec_timesteps), dtype=np.float32)
    origin_articles = (['None'] * self._hps.batch_size)
    origin_abstracts = (['None'] * self._hps.batch_size)
    buckets = self._bucket_input_queue.get()
    for i in xrange(self._hps.batch_size):
        (enc_inputs, dec_inputs, targets, enc_input_len, dec_output_len, article, abstract) = buckets[i]
        origin_articles[i] = article
        origin_abstracts[i] = abstract
        enc_input_lens[i] = enc_input_len
        dec_output_lens[i] = dec_output_len
        enc_batch[i, :] = enc_inputs[:]
        dec_batch[i, :] = dec_inputs[:]
        target_batch[i, :] = targets[:]
        for j in xrange(dec_output_len):
            loss_weights[i][j] = 1
    return (enc_batch, dec_batch, target_batch, enc_input_lens, dec_output_lens, loss_weights, origin_articles, origin_abstracts)
