import tensorflow as tf

  #      'Crop size must be specified for using image-level feature.')
  if model_options.model_variant == 'mobilenet_v2':
    if (model_options.atrous_rates is not None or
        model_options.decoder_output_stride is not None):
      # Output a warning and users should make sure if the setting is desired.
      tf.logging.warning('Our provided mobilenet_v2 checkpoint does not '
                         'include ASPP and decoder modules.')

  crop_height = (
      model_options.crop_size[0]
      if model_options.crop_size else tf.shape(images)[1])
  crop_width = (
      model_options.crop_size[1]
      if model_options.crop_size else tf.shape(images)[2])

  # Compute the height, width for the output logits.
  logits_output_stride = (
      model_options.decoder_output_stride or model_options.output_stride)

  logits_height = scale_dimension(
