(n_px)
| 77 | |
| 78 | |
| 79 | def _transform(n_px): |
| 80 | return Compose([ |
| 81 | Resize(n_px, interpolation=BICUBIC), |
| 82 | CenterCrop(n_px), |
| 83 | _convert_image_to_rgb, |
| 84 | ToTensor(), |
| 85 | Normalize((0.48145466, 0.4578275, 0.40821073), (0.26862954, 0.26130258, 0.27577711)), |
| 86 | ]) |
| 87 | |
| 88 | |
| 89 | def available_models() -> List[str]: |