From 48845081100e834e6e3f89df1873d7a5b6362c91 Mon Sep 17 00:00:00 2001 From: perry0418 <34980036+perry0418@users.noreply.github.com> Date: Mon, 25 Mar 2019 14:59:02 +0800 Subject: [PATCH] Update utils.py solve the multi-gpu training problem --- utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index 1f4e03b0..76b25df2 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -285,7 +285,7 @@ def compute_loss(p, targets): # predictions, targets def build_targets(model, targets, pred): # targets = [image, class, x, y, w, h] - if isinstance(model, nn.DataParallel): + if isinstance(model, nn.parallel.DistributedDataParallel): model = model.module yolo_layers = get_yolo_layers(model)