TorchSeg icon indicating copy to clipboard operation
TorchSeg copied to clipboard

Where can i download the ResNet18 pretrained model??

Open XdpAreKid opened this issue 6 years ago • 9 comments

Hello, I can't the way to download the pretrained model of resnet18 which is converted from gluon

XdpAreKid avatar Feb 20 '19 03:02 XdpAreKid

@XdpAreKid I will release the pre-trained model recently.

yu-changqian avatar Feb 20 '19 06:02 yu-changqian

@XdpAreKid I will release the pre-trained model recently.

Please quickly.

luke-evans-liu avatar Mar 07 '19 07:03 luke-evans-liu

@luke-evans-liu I use this.It can get a good result in my data

XdpAreKid avatar Mar 07 '19 08:03 XdpAreKid

@XdpAreKid i use gluon it makes the mistake like this: Traceback (most recent call last): File "train.py", line 62, in norm_layer=BatchNorm2d) File "/TorchSeg/model/bisenet/cityscapes.bisenet.R18/network.py", line 26, in init deep_stem=False, stem_width=64) File "/TorchSeg/furnace/base_model/resnet.py", line 191, in resnet18 model = load_model(model, pretrained_model) File "/TorchSeg/furnace/utils/pyt_utils.py", line 41, in load_model model.load_state_dict(state_dict, strict=False) File "/usr/local/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 742, in load_state_dict state_dict = state_dict.copy() File "/usr/local/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 535, in getattr type(self).name, name)) AttributeError: 'ResNet' object has no attribute 'copy'

moonmyth avatar Mar 12 '19 03:03 moonmyth

How did you load the model? @moonmyth

XdpAreKid avatar Mar 12 '19 07:03 XdpAreKid

load model as follow in config.py C.pretrained_model = gcv.models.resnet18(pretrained=True)

moonmyth avatar Mar 20 '19 01:03 moonmyth

Any updates on how to load a pretrained model ?

alexanderfrey avatar Apr 02 '19 16:04 alexanderfrey

@moonmyth @alexanderfrey For my code, i just down this weights in my computer, and then in config.py C.pretrained_model = 'path to your weights'

XdpAreKid avatar Apr 04 '19 05:04 XdpAreKid

load model as follow in config.py C.pretrained_model = gcv.models.resnet18(pretrained=True)

I have the same problem . have you solved it

majuncai avatar Apr 17 '19 12:04 majuncai