import tensorflow as tf

      with slim.arg_scope([slim.batch_norm], **batch_norm_params):
        depth = 256
        branch_logits = []

        if model_options.add_image_level_feature:
          # modified by Paul Voigtlaender
          if is_training:
            pool_height = scale_dimension(model_options.crop_size[0],
                                          1. / model_options.output_stride)
            pool_width = scale_dimension(model_options.crop_size[1],
                                          1. / model_options.output_stride)
            image_feature = slim.avg_pool2d(
                features, [pool_height, pool_width], [pool_height, pool_width],
                padding='VALID')
          else:
            pool_height = tf.shape(features)[1]
            pool_width = tf.shape(features)[2]
            image_feature = tf.reduce_mean(features, axis=[1,2])[:, tf.newaxis, tf.newaxis, :]
          image_feature = slim.conv2d(
              image_feature, depth, 1, scope=_IMAGE_POOLING_SCOPE)
          image_feature = tf.image.resize_bilinear(
              image_feature, [pool_height, pool_width], align_corners=True)
          if is_training:
            image_feature.set_shape([None, pool_height, pool_width, depth])
          branch_logits.append(image_feature)

        # Employ a 1x1 convolution.
        branch_logits.append(slim.conv2d(features, depth, 1,
                                         scope=_ASPP_SCOPE + str(0)))

