| 19 | |
| 20 | |
| 21 | class ResNet18Model(EagerModelBase): |
| 22 | def __init__(self): |
| 23 | pass |
| 24 | |
| 25 | def get_eager_model(self) -> torch.nn.Module: |
| 26 | logging.info("Loading torchvision resnet18 model") |
| 27 | resnet18_model = resnet18(weights=ResNet18_Weights.IMAGENET1K_V1) |
| 28 | logging.info("Loaded torchvision resnet18 model") |
| 29 | return resnet18_model |
| 30 | |
| 31 | def get_example_inputs(self): |
| 32 | input_shape = (1, 3, 224, 224) |
| 33 | return (torch.randn(input_shape),) |
| 34 | |
| 35 | |
| 36 | class ResNet50Model(EagerModelBase): |
no outgoing calls