import tensorflow as tf

      serialized_example,
      # Defaults are not specified since both keys are required.
      features={
          'image_raw': tf.FixedLenFeature([], tf.string),
          'label': tf.FixedLenFeature([], tf.int64),
      })

  if FLAGS.contrast_norm == 'areafactor':
      image = tf.decode_raw(features['image_raw'], tf.float32)
  else:
    image = tf.decode_raw(features['image_raw'], tf.uint8)
    image = tf.cast(image, tf.float32) * (1. / 255)
 
  image.set_shape(np.prod([FLAGS.num_scales, FLAGS.crop_size, FLAGS.crop_size]))
  image = tf.reshape(image, [FLAGS.num_scales, FLAGS.crop_size, FLAGS.crop_size, 1])
  image = image - 0.5
