Replace anchors from int to float on YOLOv5

This commit is contained in:
Marcos Luciano
2022-03-25 11:41:43 -03:00
parent 92ab859255
commit a310f90cd7

View File

@@ -111,7 +111,7 @@ with open(wts_file, "w") as f:
conv_count += 1 conv_count += 1
elif "anchor_grid" in k: elif "anchor_grid" in k:
vr = v.cpu().numpy().tolist() 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] anchors = str(a)[1:-1]
num = 0 num = 0
for m in vr: for m in vr: