The problem is with your Scale transform. I’m guessing self.resolution is a tuple? For some reason the documentation for torchvision is for the newest version, in which Scale does take a tuple, but the most recent release (which you presumably have) only takes a single int. That being the desired size of the smaller edge. You should either change to that (if possible, since it does require the scaled version to have the same aspect ratio), or install torchvision from HEAD.