Преглед на файлове

torch.from_tensor() bug fix

5.0
Glenn Jocher преди 4 години
родител
ревизия
09402a2174
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. +1
    -1
      train.py

+ 1
- 1
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()

Loading…
Отказ
Запис