π [Fix] bug in DDP sync_dist
Browse files- yolo/tools/solver.py +0 -3
- yolo/utils/bounding_box_utils.py +1 -1
yolo/tools/solver.py
CHANGED
|
@@ -49,10 +49,7 @@ class ValidateModel(BaseModel):
|
|
| 49 |
"map": batch_metrics["map"],
|
| 50 |
"map_50": batch_metrics["map_50"],
|
| 51 |
},
|
| 52 |
-
prog_bar=True,
|
| 53 |
-
logger=False,
|
| 54 |
on_step=True,
|
| 55 |
-
sync_dist=True,
|
| 56 |
batch_size=batch_size,
|
| 57 |
)
|
| 58 |
return predicts
|
|
|
|
| 49 |
"map": batch_metrics["map"],
|
| 50 |
"map_50": batch_metrics["map_50"],
|
| 51 |
},
|
|
|
|
|
|
|
| 52 |
on_step=True,
|
|
|
|
| 53 |
batch_size=batch_size,
|
| 54 |
)
|
| 55 |
return predicts
|
yolo/utils/bounding_box_utils.py
CHANGED
|
@@ -129,7 +129,7 @@ def generate_anchors(image_size: List[int], strides: List[int]):
|
|
| 129 |
shift = stride // 2
|
| 130 |
h = torch.arange(0, H, stride) + shift
|
| 131 |
w = torch.arange(0, W, stride) + shift
|
| 132 |
-
if torch.__version__ >= "
|
| 133 |
anchor_h, anchor_w = torch.meshgrid(h, w, indexing="ij")
|
| 134 |
else:
|
| 135 |
anchor_h, anchor_w = torch.meshgrid(h, w)
|
|
|
|
| 129 |
shift = stride // 2
|
| 130 |
h = torch.arange(0, H, stride) + shift
|
| 131 |
w = torch.arange(0, W, stride) + shift
|
| 132 |
+
if torch.__version__ >= "2.3.0":
|
| 133 |
anchor_h, anchor_w = torch.meshgrid(h, w, indexing="ij")
|
| 134 |
else:
|
| 135 |
anchor_h, anchor_w = torch.meshgrid(h, w)
|