忘情不是洒脱 发表于 2025-3-29 07:33 怎么解决这种, 我跟你一摸一样的错误 |
MrKiss 发表于 2025-3-26 00:07 还是不行,提示: train: weights=yolov5s.pt, cfg=, data=../datasets/lcdnf/lcdnf.yaml, hyp=data\hyps\hyp.scratch-low.yaml, epochs=300, batch_size=16, imgsz=640, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, noplots=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=8, project=runs\train, name=exp, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, seed=0, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest github: skipping check (not a git repository), for updates see https://github.com/ultralytics/yolov5 YOLOv5 2023-8-5 Python-3.10.0 torch-2.6.0+cpu CPU hyperparameters: lr0=0.01, lrf=0.01, 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, copy_paste=0.0 ClearML: run 'pip install clearml' to automatically track, visualize and remotely train YOLOv5 in ClearML Comet: run 'pip install comet_ml' to automatically track and visualize YOLOv5 runs in Comet TensorBoard: Start with 'tensorboard --logdir runs\train', view at http://localhost:6006/ Traceback (most recent call last): File "E:\yolo\yolov5-7.0\train.py", line 636, in <module> main(opt) File "E:\yolo\yolov5-7.0\train.py", line 529, in main train(opt.hyp, opt, device, callbacks) File "E:\yolo\yolov5-7.0\train.py", line 125, in train ckpt = torch.load(weights, map_location='cpu') # load checkpoint to CPU to avoid CUDA memory leak File "C:\Users\windows\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 1470, 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 models.yolo.Model was not an allowed global by default. Please use `torch.serialization.add_safe_globals([Model])` or the `torch.serialization.safe_globals([Model])` 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. 请按任意键继续. . . |
忘情不是洒脱 发表于 2025-3-23 08:02 补到不提示位置,我就是这样,后面就可以正常运行了 |
MrKiss 发表于 2024-8-28 11:54 大哥,你这个缺什么补什么感觉也补太多了,我现在补了十几个了还在继续补,大概要补多少 |
MrKiss 发表于 2024-8-28 20:55 D:\yolov5-7.0>python train.py --weights yolov5s.pt --epochs 300 --batch-size 16 --workers 8 --data ../datasets/coco128/coco128.yaml train: weights=yolov5s.pt, cfg=, data=../datasets/coco128/coco128.yaml, hyp=data\hyps\hyp.scratch-low.yaml, epochs=300, batch_size=16, imgsz=640, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, noplots=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=8, project=runs\train, name=exp, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, seed=0, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest github: skipping check (not a git repository), for updates see https://github.com/ultralytics/yolov5 Traceback (most recent call last): File "train.py", line 633, in <module> main(opt) File "train.py", line 502, in main check_file(opt.data), check_yaml(opt.cfg), check_yaml(opt.hyp), str(opt.weights), str(opt.project) # checks File "D:\yolov5-7.0\utils\general.py", line 483, in check_file assert len(files), f'File not found: {file}' # assert file was found AssertionError: File not found: ../datasets/coco128/coco128.yaml |
独特舞步 发表于 2024-9-1 23:45 虽然报了你那个dll的错误,但是缺少的并不是那个dll,应该是这个dll的一个依赖的dll,你用dependence查一下就看到了 |
独特舞步 发表于 2024-8-28 22:37 安装CDUA 然后重新测试 直接百du有一套 |
torch 卸载了 重新安装别的版本 看看requirements.txt中 torch 版本 改成别的 |
fengyishen 发表于 2024-9-2 14:07 那需要怎么才安装全呢? |
独特舞步 发表于 2024-8-28 22:37 torch 没引用成功。应该是模块没有安装全,或者版本不匹配 |
sitemap|
易语言源码|
易语言教程|
易语言论坛|
易语言模块|
手机版|
广告投放|
精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:[email protected]
网站简介:精易论坛成立于2009年,是一个程序设计学习交流技术论坛,隶属于揭阳市揭东区精易科技有限公司所有。
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司
( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173