(n_px)
| 56 | |
| 57 | |
| 58 | def _transform(n_px): |
| 59 | return Compose([ |
| 60 | Resize(n_px, interpolation=Image.BICUBIC), |
| 61 | CenterCrop(n_px), |
| 62 | lambda image: image.convert("RGB"), |
| 63 | ToTensor(), |
| 64 | Normalize((0.48145466, 0.4578275, 0.40821073), (0.26862954, 0.26130258, 0.27577711)), |
| 65 | ]) |
| 66 | |
| 67 | |
| 68 | def available_models() -> List[str]: |