(yolo) F:\BaiduNetdiskDownload\Jetson Orin NX\附件\源代码\yoloV5-5.0\yolov5\yolov5>python ./train.py
github: skipping check (offline)
Traceback (most recent call last):
File "F:\BaiduNetdiskDownload\Jetson Orin NX\附件\源代码\yoloV5-5.0\yolov5\yolov5\train.py", line 514, in <module>
opt.data, opt.cfg, opt.hyp = check_file(opt.data), check_file(opt.cfg), check_file(opt.hyp) # check files
File "F:\BaiduNetdiskDownload\Jetson Orin NX\附件\源代码\yoloV5-5.0\yolov5\yolov5\utils\general.py", line 151, in check_file
assert len(files), 'File Not Found: %s' % file # assert file was found
AssertionError: File Not Found: data/data.yaml
(yolo) F:\BaiduNetdiskDownload\Jetson Orin NX\附件\源代码\yoloV5-5.0\yolov5\yolov5>python ./train.py
github: skipping check (offline)
YOLOv5 2023-4-25 torch 2.7.1+cu128 CUDA:0 (NVIDIA GeForce RTX 4080 Laptop GPU, 12281.5MB)
Namespace(weights='yolov5s.pt', cfg='', data='data.yaml', hyp='data/hyp.scratch.yaml', epochs=300, batch_size=16, img_size=[640, 640], rect=False, resume=False, nosave=False, notest=False, noautoanchor=False, evolve=False, bucket='', cache_images=False, image_weights=False, device='', multi_scale=False, single_cls=False, adam=False, sync_bn=False, local_rank=-1, workers=8, project='runs/train', entity=None, name='exp', exist_ok=False, quad=False, linear_lr=False, label_smoothing=0.0, upload_dataset=False, bbox_interval=-1, save_period=-1, artifact_alias='latest', world_size=1, global_rank=-1, save_dir='runs\\train\\exp3', total_batch_size=16)
tensorboard: Start with 'tensorboard --logdir runs/train', view at http://localhost:6006/
hyperparameters: lr0=0.01, lrf=0.2, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0
Traceback (most recent call last):
File "F:\BaiduNetdiskDownload\Jetson Orin NX\附件\源代码\yoloV5-5.0\yolov5\yolov5\train.py", line 543, in <module>
train(hyp, opt, device, tb_writer)
File "F:\BaiduNetdiskDownload\Jetson Orin NX\附件\源代码\yoloV5-5.0\yolov5\yolov5\train.py", line 71, in train
run_id = torch.load(weights).get('wandb_id') if weights.endswith('.pt') and os.path.isfile(weights) else None
File "D:\anaconda\envs\yolo\lib\site-packages\torch\serialization.py", line 1524, in load
raise pickle.UnpicklingError(_get_wo_message(str(e))) from None
_pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
(2) Alternatively, to load with `weights_only=True` please check the recommended steps in the following error message.
WeightsUnpickler error: Unsupported global: GLOBAL numpy.core.multiarray._reconstruct was not an allowed global by default. Please use `torch.serialization.add_safe_globals([numpy.core.multiarray._reconstruct])` or the `torch.serialization.safe_globals([numpy.core.multiarray._reconstruct])` context manager to allowlist this global if you trust this class/function.
Check the documentation of torch.load to learn more about types accepted by default with weights_only https://pytorch.org/docs/stable/generated/torch.load.html.
最新发布