Few-shot-Object-Detection-via-Feature-Reweighting
Few-shot-Object-Detection-via-Feature-Reweighting copied to clipboard
Error in loading the weight file
Sorry for troubling you. When I run train_meta.py and load weightfile, a runtimeerror occured:
File "dior_train_meta.py", line 85, in
Do you know what's wrong with this? Thank you so much. The environment is under torch==1.4.0, python3.7.
Excuse me, have you successfully run this code?
Sorry for troubling you. When I run train_meta.py and load weightfile, a runtimeerror occured:
File "dior_train_meta.py", line 85, in model.load_weights(weightfile) File "/home/baby47/Documents/Few-shot Learning/DeepTrial-Few-shot-Object-Detection-via-Feature-Reweighting-main/models/darknet_meta.py", line 375, in load_weights start = load_conv_bn(buf, start, model[0], model[1]) File "/home/baby47/Documents/Few-shot Learning/DeepTrial-Few-shot-Object-Detection-via-Feature-Reweighting-main/cfg/cfg.py", line 469, in load_conv_bn conv_model.weight.data.copy_(torch.from_numpy(buf[start:start+num_w])); start = start + num_w RuntimeError: The size of tensor a (3) must match the size of tensor b (864) at non-singleton dimension 3
Do you know what's wrong with this? Thank you so much. The environment is under torch==1.4.0, python3.7.
Replace line no 469 with "conv_model.weight.data.copy_(torch.from_numpy(buf[start:start+num_w]).reshape_as(conv_model.weight.data)); start = start + num_w "