MCPcopy Create free account
hub / github.com/FreeformRobotics/OTS / resnet18

Function resnet18

models/resnet.py:160–169  ·  view source on GitHub ↗

Constructs a ResNet-18 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet

(pretrained=False, **kwargs)

Source from the content-addressed store, hash-verified

158 return x
159
160def resnet18(pretrained=False, **kwargs):
161 """Constructs a ResNet-18 model.
162
163 Args:
164 pretrained (bool): If True, returns a model pre-trained on ImageNet
165 """
166 model = ResNet(BasicBlock, [2, 2, 2, 2], **kwargs)
167 if pretrained:
168 model.load_state_dict(load_url(model_urls['resnet18']))
169 return model
170
171'''
172def resnet34(pretrained=False, **kwargs):

Callers

nothing calls this directly

Calls 2

ResNetClass · 0.85
load_urlFunction · 0.85

Tested by

no test coverage detected