code: def training(loss_op):
    
    global_step = tf.Variable(0, name='global_step', trainable=False)
    with tf.name_scope('train'):
      optimizer = tf.train.AdamOptimizer(epsilon=0.001)
      train_op = optimizer.minimize(loss_op, global_step)
      return train_op, global_step
docs: Calculates the loss from the logits and the labels.
  
    Args:
      logits: Logits tensor, float - [batch_size, NUM_CLASSES].
      labels: Labels tensor, int32 - [batch_size].
    Returns:
      loss: Loss tensor of type float.