| 17 | |
| 18 | |
| 19 | class DeepLabV3ResNet50Model(EagerModelBase): |
| 20 | def __init__(self): |
| 21 | pass |
| 22 | |
| 23 | def get_eager_model(self) -> torch.nn.Module: |
| 24 | logging.info("loading deeplabv3_resnet50 model") |
| 25 | deeplabv3_model = deeplabv3_resnet50( |
| 26 | weights=deeplabv3.DeepLabV3_ResNet50_Weights.DEFAULT |
| 27 | ) |
| 28 | logging.info("loaded deeplabv3_resnet50 model") |
| 29 | return deeplabv3_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 DeepLabV3ResNet101Model(EagerModelBase): |
no outgoing calls