Reading Yann LeCun’s report “Gradient-based learning applied to document recogniition” i saw he used a couple of data augmentation techniques on the MNIST dataset, including squeezing (“simultaneous horizontal compression and vertical elongation, or the reverse”). I would like to implement squeezing as data augmentation in my own PyTorch project, however I can’t seem to find a proper way to do it. I have been searching around but haven’t found anything useful.
Anyone who knows how to implement squeezing in pytorch, either with the pre-built torchvision transformations or as a custom transformation?