| 34 | |
| 35 | |
| 36 | class ResNet50Model(EagerModelBase): |
| 37 | def __init__(self): |
| 38 | pass |
| 39 | |
| 40 | def get_eager_model(self) -> torch.nn.Module: |
| 41 | logging.info("Loading torchvision resnet50 model") |
| 42 | resnet50_model = resnet50(weights=ResNet50_Weights.IMAGENET1K_V1) |
| 43 | logging.info("Loaded torchvision resnet50 model") |
| 44 | return resnet50_model |
| 45 | |
| 46 | def get_example_inputs(self): |
| 47 | input_shape = (1, 3, 224, 224) |
| 48 | return (torch.randn(input_shape),) |
no outgoing calls