From 09402a2174605b98c14c0050f8c521b8517e2c08 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 25 Aug 2020 03:14:17 -0700 Subject: [PATCH] torch.from_tensor() bug fix --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 256560b..52ea927 100644 --- a/train.py +++ b/train.py @@ -225,7 +225,7 @@ def train(hyp, opt, device, tb_writer=None): if rank != -1: indices = torch.zeros([dataset.n], dtype=torch.int) if rank == 0: - indices[:] = torch.from_tensor(dataset.indices, dtype=torch.int) + indices[:] = torch.tensor(dataset.indices, dtype=torch.int) dist.broadcast(indices, 0) if rank != 0: dataset.indices = indices.cpu().numpy()