thuml / Transfer-Learning-Library

Transfer Learning Library for Domain Adaptation, Task Adaptation, and Domain Generalization
http://transfer.thuml.ai
MIT License
3.39k stars 553 forks source link

[Depricated] from torchvision.models.resnet import BasicBlock, Bottleneck, model_urls #221

Closed cs-mshah closed 10 months ago

cs-mshah commented 1 year ago

import tllib.vision.models as models

for torchvision > 0.13, the model_urls are gone.

thucbx99 commented 1 year ago

Thanks for pointing this out. We are busy recently and may support latest versions of PyTorch later.

shounakd56 commented 1 year ago

In the resnet.py file, import only BasicBlock & Bottleneck from torchvision and paste this in the file:

model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth', 'resnet50': 'https://download.pytorch.org/models/resnet50-19c8e357.pth', 'resnet101': 'https://download.pytorch.org/models/resnet101-5d3b4d8f.pth', 'resnet152': 'https://download.pytorch.org/models/resnet152-b121ed2d.pth', 'resnext50_32x4d': 'https://download.pytorch.org/models/resnext50_32x4d-7cdf4587.pth', 'resnext101_32x8d': 'https://download.pytorch.org/models/resnext101_32x8d-8ba56ff5.pth', 'wide_resnet50_2': 'https://download.pytorch.org/models/wide_resnet50_2-95faca4d.pth', 'wide_resnet101_2': 'https://download.pytorch.org/models/wide_resnet101_2-32ee1156.pth', }

thucbx99 commented 10 months ago

@shounakd56 Thanks for your reply.