I am trying to load VOC12_scenes_20000.pth onto Res_Deeplab
Running this,
saved_state_dict = torch.load(args.restore_from)
new_params = model.state_dict().copy()
for i in saved_state_dict:
#Scale.layer5.conv2d_list.3.weight
i_parts = i.split('.')
# print i_parts
if not args.num_classes == 21 or not i_parts[1]=='layer5':
print(i)
new_params['.'.join(i_parts[1:])] = saved_state_dict[i]
model.load_state_dict(new_params)
gives me
*** KeyError: 'unexpected key "weight" in state_dict'
I am trying to load
VOC12_scenes_20000.pth
ontoRes_Deeplab
Running this,gives me
*** KeyError: 'unexpected key "weight" in state_dict'