(method)
| 20 | from torchvision.transforms import InterpolationMode |
| 21 | |
| 22 | def _pil_interp(method): |
| 23 | if method == 'bicubic': |
| 24 | return InterpolationMode.BICUBIC |
| 25 | elif method == 'lanczos': |
| 26 | return InterpolationMode.LANCZOS |
| 27 | elif method == 'hamming': |
| 28 | return InterpolationMode.HAMMING |
| 29 | else: |
| 30 | return InterpolationMode.BILINEAR |
| 31 | except: |
| 32 | from timm.data.transforms import _pil_interp |
| 33 |
no outgoing calls
no test coverage detected