MCPcopy Create free account
hub / github.com/pytorch/executorch / ResNet18Model

Class ResNet18Model

examples/models/resnet/model.py:21–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20
21class 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
36class ResNet50Model(EagerModelBase):

Callers 3

test_resnet18_fp16Method · 0.90
resnet18.pyFile · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by 1

test_resnet18_fp16Method · 0.72