python test.py -cfg configs/synthia/deeplabv2_r101_RA_source_free.yaml OUTPUT_DIR results/v2_synthia_ra_2.2_precent_source_free resume results/v2_gtav_ra_2.2_precent_source_free/model_iter020000.pth
I got this error :
2023-08-16 11:29:04,895 AL-RIPU.tester INFO: Loading checkpoint from results/v2_gtav_ra_2.2_precent_source_free/model_iter020000.pth
Traceback (most recent call last):
File "test.py", line 192, in
main()
File "test.py", line 188, in main
test(cfg)
File "test.py", line 93, in test
classifier.load_state_dict(classifier_weights)
File "/home/zmz/miniconda3/envs/py38/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1482, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for ASPP_Classifier_V2:
size mismatch for conv2d_list.0.weight: copying a param with shape torch.Size([19, 2048, 3, 3]) from checkpoint, the shape in current model is torch.Size([16, 2048, 3, 3]).
size mismatch for conv2d_list.0.bias: copying a param with shape torch.Size([19]) from checkpoint, the shape in current model is torch.Size([16]).
size mismatch for conv2d_list.1.weight: copying a param with shape torch.Size([19, 2048, 3, 3]) from checkpoint, the shape in current model is torch.Size([16, 2048, 3, 3]).
size mismatch for conv2d_list.1.bias: copying a param with shape torch.Size([19]) from checkpoint, the shape in current model is torch.Size([16]).
size mismatch for conv2d_list.2.weight: copying a param with shape torch.Size([19, 2048, 3, 3]) from checkpoint, the shape in current model is torch.Size([16, 2048, 3, 3]).
size mismatch for conv2d_list.2.bias: copying a param with shape torch.Size([19]) from checkpoint, the shape in current model is torch.Size([16]).
size mismatch for conv2d_list.3.weight: copying a param with shape torch.Size([19, 2048, 3, 3]) from checkpoint, the shape in current model is torch.Size([16, 2048, 3, 3]).
size mismatch for conv2d_list.3.bias: copying a param with shape torch.Size([19]) from checkpoint, the shape in current model is torch.Size([16]).