MCPcopy Create free account
hub / github.com/OpenDriveLab/TCP / _resnet

Function _resnet

TCP/resnet.py:252–265  ·  view source on GitHub ↗
(
    arch: str,
    block: Type[Union[BasicBlock, Bottleneck]],
    layers: List[int],
    pretrained: bool,
    progress: bool,
    **kwargs: Any
)

Source from the content-addressed store, hash-verified

250
251
252def _resnet(
253 arch: str,
254 block: Type[Union[BasicBlock, Bottleneck]],
255 layers: List[int],
256 pretrained: bool,
257 progress: bool,
258 **kwargs: Any
259) -> ResNet:
260 model = ResNet(block, layers, **kwargs)
261 if pretrained:
262 state_dict = load_state_dict_from_url(model_urls[arch],
263 progress=progress)
264 model.load_state_dict(state_dict)
265 return model
266
267
268def resnet18(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> ResNet:

Callers 9

resnet18Function · 0.85
resnet34Function · 0.85
resnet50Function · 0.85
resnet101Function · 0.85
resnet152Function · 0.85
resnext50_32x4dFunction · 0.85
resnext101_32x8dFunction · 0.85
wide_resnet50_2Function · 0.85
wide_resnet101_2Function · 0.85

Calls 1

ResNetClass · 0.85

Tested by

no test coverage detected