def METHOD_NAME(exe, program, data_loader, loss, log_per_step=1):
    total_loss = 0.
    total_sample = 0
    for batch, (src, dsts) in enumerate(data_loader):
        num_samples = len(src)
        feed_dict = {"src": src, "dsts": dsts}
        begin_time = time.time()
        loss_val, = exe.run(program, fetch_list=[loss.name], feed=feed_dict)
        step_time = time.time() - begin_time
        loss_val = loss_val.mean()
        total_loss += loss_val * num_samples
        total_sample += num_samples
        if batch % log_per_step == 0:
            log.info("Batch %s\t%s-Loss %.6f\t%.6f sec/step" %
                     (batch, "train", loss_val, step_time))
    return total_loss / total_sample