🎨 Import load_state_dict_from_url directly

pull/842/head
nateraw 3 years ago
parent e65a2cba3d
commit adcb74f87f

@ -11,10 +11,10 @@ from typing import Any, Callable, Optional, Tuple
import torch import torch
import torch.nn as nn import torch.nn as nn
from torch.hub import load_state_dict_from_url
from .features import FeatureListNet, FeatureDictNet, FeatureHookNet 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 from .layers import Conv2dSame, Linear

@ -6,7 +6,7 @@ from pathlib import Path
from typing import Union from typing import Union
import torch 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: try:
from torch.hub import get_dir from torch.hub import get_dir
except ImportError: except ImportError:

Loading…
Cancel
Save