(
arch: str,
block: Type[Union[BasicBlock, Bottleneck]],
layers: List[int],
pretrained: bool,
progress: bool,
**kwargs: Any
)
| 250 | |
| 251 | |
| 252 | def _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 | |
| 268 | def resnet18(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> ResNet: |
no test coverage detected