Closed saeedkhanehgir closed 3 years ago
@saeedkhanehgir have you solved?
@saeedkhanehgir I found the reason, after I using normal_prune.py, the weights file should end with .weights, but it end with pt, when I using convert.py, the error came out
This bug has already fixed
Hi after pruning and use prune_0.5_percent_last.pt and pruned cfg file for inference by detect.py i get error
Traceback (most recent call last): File "detect.py", line 191, in
detect()
File "detect.py", line 25, in detect
model.load_state_dict(torch.load(weights, map_location=device)['model'])
File "/home/saeed/anaconda3/envs/py_torch/lib/python3.8/site-packages/torch/serialization.py", line 529, in load
return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args)
File "/home/saeed/anaconda3/envs/py_torch/lib/python3.8/site-packages/torch/serialization.py", line 692, in _legacy_load
magic_number = pickle_module.load(f, pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\x00'.
Does anyone have an idea to fix this error?