Skip to content

Commit

Permalink
support new version of torchvision (median-research-group#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
Baijiong-Lin authored Nov 22, 2023
1 parent 5f81dfa commit d300730
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion LibMTL/model/resnet.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import torch
import torch.nn as nn
from torchvision.models.utils import load_state_dict_from_url
try:
from torchvision.models.utils import load_state_dict_from_url
except:
from torch.hub import load_state_dict_from_url


# __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
Expand Down

0 comments on commit d300730

Please sign in to comment.