From 5f3c8214d1fdb2460016764c5b6d26de686e85b3 Mon Sep 17 00:00:00 2001 From: wangliang Date: Thu, 14 Jan 2021 19:45:25 +0800 Subject: [PATCH 1/3] sleep 3 sec to load data . --- train.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/train.py b/train.py index 459c81c6130d..f99312ab7d73 100644 --- a/train.py +++ b/train.py @@ -178,6 +178,9 @@ def train(hyp, opt, device, tb_writer=None, wandb=None): if cuda and rank != -1: model = DDP(model, device_ids=[opt.local_rank], output_device=opt.local_rank) + print("sleep 3 sec to load data .") + time.sleep(3) + # Trainloader dataloader, dataset = create_dataloader(train_path, imgsz, batch_size, gs, opt, hyp=hyp, augment=True, cache=opt.cache_images, rect=opt.rect, rank=rank, From b5c41a79beaf3ccd1bdd5ea87afd90ef09a18dec Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 15 Jan 2021 09:51:06 -0800 Subject: [PATCH 2/3] Update train.py --- train.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/train.py b/train.py index f99312ab7d73..459c81c6130d 100644 --- a/train.py +++ b/train.py @@ -178,9 +178,6 @@ def train(hyp, opt, device, tb_writer=None, wandb=None): if cuda and rank != -1: model = DDP(model, device_ids=[opt.local_rank], output_device=opt.local_rank) - print("sleep 3 sec to load data .") - time.sleep(3) - # Trainloader dataloader, dataset = create_dataloader(train_path, imgsz, batch_size, gs, opt, hyp=hyp, augment=True, cache=opt.cache_images, rect=opt.rect, rank=rank, From 172e6cd639e0ae8b7a3b274b024162c541427eef Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 15 Jan 2021 09:52:33 -0800 Subject: [PATCH 3/3] Add nn.SiLU inplace in attempt_load() --- models/experimental.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/experimental.py b/models/experimental.py index 2dbbf7fa32f2..72dc877c83cf 100644 --- a/models/experimental.py +++ b/models/experimental.py @@ -119,7 +119,7 @@ def attempt_load(weights, map_location=None): # Compatibility updates for m in model.modules(): - if type(m) in [nn.Hardswish, nn.LeakyReLU, nn.ReLU, nn.ReLU6]: + if type(m) in [nn.Hardswish, nn.LeakyReLU, nn.ReLU, nn.ReLU6, nn.SiLU]: m.inplace = True # pytorch 1.7.0 compatibility elif type(m) is Conv: m._non_persistent_buffers_set = set() # pytorch 1.6.0 compatibility