Remove dtype check that is already done in tf.cast
@@ -15,7 +15,6 @@ def _smooth_one_hot_labels(logits, labels, label_smoothing):
def _softmax_cross_entropy(logits, labels, label_smoothing, training):
# Computes the softmax in full precision.
- if logits.dtype.base_dtype != tf.float32:
logits = tf.cast(logits, tf.float32)
if training and label_smoothing > 0.0:
smoothed_labels = _smooth_one_hot_labels(logits, labels, label_smoothing)
