mirror of
https://github.com/ultralytics/yolov5.git
synced 2025-06-03 14:49:29 +08:00
DDP nl
fix (#5332)
This commit is contained in:
parent
9c31a66f5d
commit
a4fece8c14
2
train.py
2
train.py
@ -246,7 +246,7 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
|
||||
model = DDP(model, device_ids=[LOCAL_RANK], output_device=LOCAL_RANK)
|
||||
|
||||
# Model parameters
|
||||
nl = model.model[-1].nl # number of detection layers (to scale hyps)
|
||||
nl = de_parallel(model).model[-1].nl # number of detection layers (to scale hyps)
|
||||
hyp['box'] *= 3. / nl # scale to layers
|
||||
hyp['cls'] *= nc / 80. * 3. / nl # scale to classes and layers
|
||||
hyp['obj'] *= (imgsz / 640) ** 2 * 3. / nl # scale to image size and layers
|
||||
|
Loading…
x
Reference in New Issue
Block a user