Skip to content

Commit 0036860

Browse files
jaesunysoumith
authored andcommitted
Fix RandomResizedCrop.__repr__ (#453)
1 parent 3b6c670 commit 0036860

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/transforms/transforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ def __call__(self, img):
525525
def __repr__(self):
526526
interpolate_str = _pil_interpolation_to_str[self.interpolation]
527527
format_string = self.__class__.__name__ + '(size={0}'.format(self.size)
528-
format_string += ', scale={0}'.format(round(self.scale, 4))
529-
format_string += ', ratio={0}'.format(round(self.ratio, 4))
528+
format_string += ', scale={0}'.format(tuple(round(s, 4) for s in self.scale))
529+
format_string += ', ratio={0}'.format(tuple(round(r, 4) for r in self.ratio))
530530
format_string += ', interpolation={0})'.format(interpolate_str)
531531
return format_string
532532

0 commit comments

Comments
 (0)