import tensorflow as tf

    if add_flipped_images:
      scales_to_logits_reversed = (
          outputs_to_scales_to_logits_reversed[output])
      logits_reversed = _resize_bilinear(
          tf.reverse_v2(scales_to_logits_reversed[MERGED_LOGITS_SCOPE], [2]),
          tf.shape(images)[1:3],
          scales_to_logits_reversed[MERGED_LOGITS_SCOPE].dtype)
      outputs_to_predictions[output].append(
          tf.expand_dims(tf.nn.softmax(logits_reversed), 4))

