mirror of https://github.com/WongKinYiu/yolov7.git
fix cpu-only training CUDA error (#369)
parent
6bacefff5c
commit
cc42a206ef
2
train.py
2
train.py
|
@ -68,7 +68,7 @@ def train(hyp, opt, device, tb_writer=None):
|
|||
loggers = {'wandb': None} # loggers dict
|
||||
if rank in [-1, 0]:
|
||||
opt.hyp = hyp # add hyperparameters
|
||||
run_id = torch.load(weights).get('wandb_id') if weights.endswith('.pt') and os.path.isfile(weights) else None
|
||||
run_id = torch.load(weights, map_location=device).get('wandb_id') if weights.endswith('.pt') and os.path.isfile(weights) else None
|
||||
wandb_logger = WandbLogger(opt, Path(opt.save_dir).stem, run_id, data_dict)
|
||||
loggers['wandb'] = wandb_logger.wandb
|
||||
data_dict = wandb_logger.data_dict
|
||||
|
|
Loading…
Reference in New Issue