import tensorflow as tf

  Returns:
      A tensor with the cross entropy loss.
  """
  logits.get_shape().assert_is_compatible_with(labels.get_shape())
  with tf.name_scope(name):
    num_classes = labels.get_shape()[-1].value
    labels = tf.cast(labels, logits.dtype)
    if label_smoothing > 0:
