def iresgroupfix152(pretrained=False, **kwargs): """Constructs a iResGroupFix-152 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet """ model = iResGroupFix(ResGroupBlock, [3, 8, 36, 3], **kwargs) if pretrained: os.makedirs(default_cache_path, exist_ok=True) model.load_state_dict(torch.load(download_from_url(model_urls['iresgroupfix152'], root=default_cache_path))) return model
def pyconvresnet152(pretrained=False, **kwargs): """Constructs a PyConvResNet-152 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet """ model = PyConvResNet(PyConvBlock, [3, 8, 36, 3], **kwargs) if pretrained: os.makedirs(default_cache_path, exist_ok=True) model.load_state_dict(torch.load(download_from_url(model_urls['pyconvresnet152'], root=default_cache_path))) return model
def seiresnet1001(pretrained=False, **kwargs): """Constructs a iResNet-1001 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet """ model = seiResNet(Bottleneck, [4, 155, 170, 4], **kwargs) if pretrained: os.makedirs(default_cache_path, exist_ok=True) model.load_state_dict(torch.load(download_from_url(model_urls['seiresnet1001'], root=default_cache_path))) return model
def seiresnet34(pretrained=False, **kwargs): """Constructs a iResNet-34 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet """ model = seiResNet(BasicBlock, [3, 4, 6, 3], **kwargs) if pretrained: os.makedirs(default_cache_path, exist_ok=True) model.load_state_dict(torch.load(download_from_url(model_urls['seiresnet34'], root=default_cache_path))) return model
def resstage200(pretrained=False, **kwargs): """Constructs a ResStage-152 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet """ model = ResStage(Bottleneck, [3, 24, 36, 3], **kwargs) if pretrained: os.makedirs(default_cache_path, exist_ok=True) model.load_state_dict( torch.load( download_from_url(model_urls['resstage200'], root=default_cache_path))) return model
def resgroup101(pretrained=False, **kwargs): """Constructs a ResGroup-101 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet """ model = ResGroup(ResGroupBlock, [3, 4, 23, 3], **kwargs) if pretrained: os.makedirs(default_cache_path, exist_ok=True) model.load_state_dict( torch.load( download_from_url(model_urls['resgroup101'], root=default_cache_path))) return model