(self, img)
| 40 | self.scales = scales |
| 41 | |
| 42 | def forward(self, img): |
| 43 | out = [] |
| 44 | cc = transforms.CenterCrop(self.size) |
| 45 | for scale in self.scales: |
| 46 | size_ = int(scale * self.size) |
| 47 | rs = transforms.Resize(size_, interpolation=_pil_interp('bicubic')) |
| 48 | img_ = rs(img) |
| 49 | img_ = cc(img_) |
| 50 | out.append(img_) |
| 51 | |
| 52 | return out |
| 53 | |
| 54 | def __repr__(self) -> str: |
| 55 | return f'{self.__class__.__name__}(size={self.size}, scale={self.scales})' |
nothing calls this directly
no test coverage detected