code: def cross_entropy(labels, logits):
      
      with tf.variable_scope("cross_entropy"):
          return tf.nn.softmax_cross_entropy_with_logits(labels=labels, logits=logits)
docs: Calculate the cross_entropy.
  
      :param labels: A float tensor of shape [batch_size, ..., num_classes] representing the label class probabilities.
      :param logits: A float tensor of shape [batch_size, ..., num_classes] representing the logits.
      :return: A tensor representing the cross entropy.