diff --git a/yolo/model/yolo.py b/yolo/model/yolo.py index 8d463c1..1252916 100644 --- a/yolo/model/yolo.py +++ b/yolo/model/yolo.py @@ -142,7 +142,7 @@ def save_load_weights(self, weights: Union[Path, OrderedDict]): if weights_key not in weights: #.ckpt weights_key = "model." + model_key if weights_key not in weights: #.pt old - weights_key = model_key.removeprefix("model.") + weights_key = model_key[6:] if weights_key not in weights: error_dict["Not Found"].add(tuple(model_key.split(".")[:-2])) continue