'Preprocess a single image in [height, width, depth] layout.'

def preprocess(self, image):

    if ((self.subset == 'train') and self.use_distortion):
        image = tf.image.resize_image_with_crop_or_pad(image, 40, 40)
        image = tf.random_crop(image, [HEIGHT, WIDTH, DEPTH])
        image = tf.image.random_flip_left_right(image)
    return image
