wasidennis / AdaptSegNet

Learning to Adapt Structured Output Space for Semantic Segmentation, CVPR 2018 (spotlight)
845 stars 205 forks source link

Loading error of ResNet-101 baseline model #90

Closed JuiChang closed 3 years ago

JuiChang commented 3 years ago

While loading the GTA5_baseline.pth downloaded from the dropbox link (in the main() of train_gta2cityscapes_multi.py), I got the loading error as such: RuntimeError: Error(s) in loading state_dict for ResNetMulti: Unexpected key(s) in state_dict: "weight", "bias", "running_mean", "running_var", "0.conv1.weight", "0.bn1.weight", "0.bn1.bias", "0.bn1.running_mean", "0.bn1.running_var", "0.conv2.weight", "0.bn2.weight", "0.bn2.bias", "0.bn2.running_mean", "0.bn2.running_var", "0.conv3.weight", "0.bn3.weight", "0.bn3.bias", "0.bn3.running_mean", "0.bn3.running_var", "0.downsample.0.weight"

I notice that the pretrained model is resnet101 (according to README), and so does the model instance in train_gta2cityscapes_multi.py. Anything I miss?

Besides, I could not connect to another link provided in README (http://vllab.ucmerced.edu/ytsai/CVPR18/GTA2Cityscapes_multi-ed35151c.pth).

Thanks!

JuiChang commented 3 years ago

The key names of GTA5_baseline.pth don't have the prepend "Scale." which the model does. After modifying the processing of new_params, I can load the pth fine.

BTW, the link works fine now.