当前位置:网站首页>pytorch Default process group is not initialized

pytorch Default process group is not initialized

2022-06-27 06:48:00 AI vision netqi

Report errors :Default process group is not initialized

Error code ,yolov5 No error during training , Wrong parameter configuration ,

    with torch_distributed_zero_first(rank):
        dataset = LoadImagesAndLabels(path, imgsz, batch_size, augment=augment,  # augment images
                                      hyp=hyp,  # augmentation hyperparameters
                                      rect=rect,  # rectangular training
                                      cache_images=cache, single_cls=opt.single_cls, stride=int(stride), pad=pad, image_weights=image_weights, prefix=prefix,data_type=data_type)


@contextmanager
def torch_distributed_zero_first(local_rank: int):
    """
    Decorator to make all processes in distributed training wait for each local_master to do something.
    """
    if local_rank not in [-1, 0]:
        torch.distributed.barrier()
    yield
    if local_rank == 0:
    
原网站

版权声明
本文为[AI vision netqi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/178/202206270632277117.html