def hrnetv2_w40(pretrained=False, weight_path=None, norm_eval=False, frozen_stages=(- 1)):
    model = HighResolutionNet(model_extra['hrnetv2_w40'], norm_eval, zero_init_residual=False, frozen_stages=frozen_stages)
    if pretrained:
        if (weight_path is not None):
            state_dict = torch.load(weight_path, map_location=torch.device('cpu'))
        else:
            state_dict = load_state_dict_from_url(model_urls['hrnetv2_w40'], progress=True)
        model.load_state_dict(state_dict, strict=False)
    return model
def hrnetv2_w40(pretrained=False, weight_path=None, norm_eval=False, frozen_stages=(- 1)):
    model = HighResolutionNet(model_extra['hrnetv2_w40'], norm_eval, zero_init_residual=False, frozen_stages=frozen_stages)
    if pretrained:
        if (weight_path is not None):
            state_dict = torch.load(weight_path, map_location=torch.device('cpu'))
        else:
            state_dict = load_state_dict_from_url(model_urls['hrnetv2_w40'], progress=True)
        model.load_state_dict(state_dict, strict=False)
    return model