def preprocessing(imgs):
    imgs = [(tf.cast(img, tf.float32) / 255.0) for img in imgs]
    if (self.args.model != 'color'):
        imgs = [tf.image.rgb_to_grayscale(img) for img in imgs]
    img_crop = tf.unstack(tf.random_crop(tf.stack(imgs, axis=0), [2, self.crop_size, self.crop_size, self.chns]), axis=0)
    return img_crop
def preprocessing(imgs):
    imgs = [(tf.cast(img, tf.float32) / 255.0) for img in imgs]
    if (self.args.model != 'color'):
        imgs = [tf.image.rgb_to_grayscale(img) for img in imgs]
    img_crop = tf.unstack(tf.random_crop(tf.stack(imgs, axis=0), [2, self.crop_size, self.crop_size, self.chns]), axis=0)
    return img_crop