import tensorflow as tf

                    encoder_input_length=None, feed_argmax=True, rewards=None, use_baseline=True,
                    training=True, global_step=None,
                    monotonicity_weight=None, monotonicity_dist=None, monotonicity_decay=None, **kwargs):
    decoder = decoders[0]
    targets = targets[0]  # single decoder

    if encoder_input_length is None:
        encoder_input_length = []
        for encoder_inputs_ in encoder_inputs:
            mask = get_weights(encoder_inputs_, utils.EOS_ID, include_first_eos=True)
            encoder_input_length.append(tf.to_int32(tf.reduce_sum(mask, axis=1)))

    parameters = dict(encoders=encoders, decoder=decoder, encoder_inputs=encoder_inputs,
                      feed_argmax=feed_argmax, training=training)

    attention_states, encoder_state, encoder_input_length = multi_encoder(
        encoder_input_length=encoder_input_length, **parameters)

    outputs, attention_weights, _, _, samples, beam_fun, initial_data = attention_decoder(
        attention_states=attention_states, initial_state=encoder_state, feed_previous=feed_previous,
