Hi,This is perhaps a very simple question, but I don’t understand
Using my data set, there are 5 categories,I wonder if we need change 19 to 5?
thanks!
new_params = model.state_dict().copy()for i in saved_state_dict:# Scale.layer5.conv2d_list.3.weighti_parts = i.split('.')# print i_partsif not args.num_classes == 19 or not i_parts[1] == 'layer5':new_params['.'.join(i_parts[1:])] = saved_state_dict[i]# print i_partsmodel.load_state_dict(new_params)
Hi,This is perhaps a very simple question, but I don’t understand Using my data set, there are 5 categories,I wonder if we need change 19 to 5? thanks!
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 == 19 or not i_parts[1] == 'layer5':
new_params['.'.join(i_parts[1:])] = saved_state_dict[i]
# print i_parts
model.load_state_dict(new_params)