MCPcopy Create free account
hub / github.com/OpenGVLab/InternVL / _pil_interp

Function _pil_interp

classification/dataset/build.py:22–30  ·  view source on GitHub ↗
(method)

Source from the content-addressed store, hash-verified

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
31except:
32 from timm.data.transforms import _pil_interp
33

Callers 2

forwardMethod · 0.85
build_transformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected