diff --git a/timm/models/helpers.py b/timm/models/helpers.py index 662a7a48..281f2412 100644 --- a/timm/models/helpers.py +++ b/timm/models/helpers.py @@ -11,10 +11,10 @@ from typing import Any, Callable, Optional, Tuple import torch import torch.nn as nn - +from torch.hub import load_state_dict_from_url from .features import FeatureListNet, FeatureDictNet, FeatureHookNet -from .hub import has_hf_hub, download_cached_file, load_state_dict_from_hf, load_state_dict_from_url +from .hub import has_hf_hub, download_cached_file, load_state_dict_from_hf from .layers import Conv2dSame, Linear diff --git a/timm/models/hub.py b/timm/models/hub.py index 31593f88..a436aff6 100644 --- a/timm/models/hub.py +++ b/timm/models/hub.py @@ -6,7 +6,7 @@ from pathlib import Path from typing import Union import torch -from torch.hub import HASH_REGEX, download_url_to_file, urlparse, load_state_dict_from_url +from torch.hub import HASH_REGEX, download_url_to_file, urlparse try: from torch.hub import get_dir except ImportError: