'Runs decoding in training mode'

def _decode_train(self, decoder, bridge, _encoder_output, _features, labels):

    target_embedded = tf.nn.embedding_lookup(self.target_embedding, labels[u'target_ids'])
    helper_train = tf_decode_helper.TrainingHelper(inputs=target_embedded[:, :(-1)], sequence_length=(labels[u'target_len'] - 1))
    decoder_initial_state = bridge()
    return decoder(decoder_initial_state, helper_train)
