From a310f90cd7d7c7dc3cea617ccaffa641a91f25b5 Mon Sep 17 00:00:00 2001 From: Marcos Luciano Date: Fri, 25 Mar 2022 11:41:43 -0300 Subject: [PATCH] Replace anchors from int to float on YOLOv5 --- utils/gen_wts_yoloV5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gen_wts_yoloV5.py b/utils/gen_wts_yoloV5.py index cc01c85..f45b2e1 100644 --- a/utils/gen_wts_yoloV5.py +++ b/utils/gen_wts_yoloV5.py @@ -111,7 +111,7 @@ with open(wts_file, "w") as f: conv_count += 1 elif "anchor_grid" in k: vr = v.cpu().numpy().tolist() - a = v.reshape(-1).cpu().numpy().astype(int).tolist() + a = v.reshape(-1).cpu().numpy().astype(float).tolist() anchors = str(a)[1:-1] num = 0 for m in vr: