import tensorflow as tf

    return loss, train_op, global_step, ul_u_updated


def build_eval_graph(x, y, ul_x, ul_u):
    losses = {}
    logit = vat.forward(x, is_training=False, update_batch_stats=False)
    nll_loss = L.ce_loss(logit, y)
    losses['NLL'] = nll_loss
    acc = L.accuracy(logit, y)
    losses['Acc'] = acc
    scope = tf.get_variable_scope()
    scope.reuse_variables()
    # at_loss = vat.adversarial_loss(x, y, nll_loss, is_training=False)
    # losses['AT_loss'] = at_loss
    ul_logit = vat.forward(ul_x, is_training=False, update_batch_stats=False)
    vat_loss = vat.virtual_adversarial_loss(ul_x, ul_u, ul_logit, is_training=False)
    losses['VAT_loss'] = vat_loss
    return losses


