spyrit.misc.statistics.transform_gray_norm

spyrit.misc.statistics.transform_gray_norm(img_size, normalize=True)[source]
Args:

img_size=int, image size

Create torchvision transform for natural images (stl10, imagenet): convert them to grayscale, then to tensor, and normalize between [-1, 1]