import tensorflow as tf


        return train_op

    def _preprocess(self, images, classes, is_train=False, **knobs):
        batch_size = knobs['batch_size']
        cutout_size = knobs['cutout_size']
        image_norm_mean = self._train_params['norm_mean']
        image_norm_std = self._train_params['norm_std']
        w = self._train_params['image_size']
        h = self._train_params['image_size']
        in_ch = 3 # Num channels of input images

        def _prepare(images, classes):
            # Bulk preprocessing of images
            images = tf.cast(images, tf.float32)
            images = (images - image_norm_mean) / image_norm_std # Normalize
            images = images / 255 # Convert to [0, 1]
            return (images, classes)

        # Prepare train dataset
        def _preprocess_train(image, clazz):
            # Do random crop + horizontal flip for each train image
            image = tf.pad(image, [[4, 4], [4, 4], [0, 0]])
            image = tf.image.random_crop(image, (w, h, in_ch))
            image = tf.image.random_flip_left_right(image)

            if cutout_size > 0:
                image = self._do_cutout(image, w, h, cutout_size)
