2

I am working on MNIST Digit Data and looking for a way to either stretch or squeeze the image. The data is of the shape (28,28) and I want the final image to be of the same shape but either stretched or squeezed.

Is there any way to do it using torchvision.transforms or using any other method?

slothfulwave612
  • 1,349
  • 9
  • 22

1 Answers1

0

I think you are looking for transforms.RandomAffine.
Stretching and squeezing the image can be done by scaling it.

Shai
  • 111,146
  • 38
  • 238
  • 371