import tensorflow as tf

   # loss2 = tf.reduce_mean(tf.square((image - logits)*mask2))
   # loss = loss1 + loss2 + loss0
   # loss = tf.reduce_mean(tf.squared_difference(logits ,annotation ))
    loss_summary = tf.summary.scalar("entropy", loss)
    
    grads = train_z(loss,z)    

    trainable_var = tf.trainable_variables()
    if FLAGS.debug:
        for var in trainable_var:
            utils.add_to_regularization_and_summary(var)
    train_op = train(loss, trainable_var)

    print("Setting up summary op...")
