|
发表于 2024-3-27 15:36:31
|
显示全部楼层
我尝试运行yolov5 这种报错该怎么解决
YOLOv5 2022-7-28 torch 1.7.1+cu110 CPU
YOLOv5 2022-7-28 torch 1.7.1+cu110 CPU
Traceback (most recent call last):
File "C:\Users\shiro\Desktop\01\yolov5-mask-42-master\window.py", line 559, in <module>
mainWindow = MainWindow()
File "C:\Users\shiro\Desktop\01\yolov5-mask-42-master\window.py", line 61, in __init__
device=self.device) # todo 指明模型加载的位置的设备
File "C:\Users\shiro\miniconda3\envs\tf2.3\lib\site-packages\torch\autograd\grad_mode.py", line 26, in decorate_context
return func(*args, **kwargs)
File "C:\Users\shiro\Desktop\01\yolov5-mask-42-master\window.py", line 77, in model_load
model = DetectMultiBackend(weights, device=device, dnn=dnn)
File "C:\Users\shiro\Desktop\01\yolov5-mask-42-master\models\common.py", line 305, in __init__
model = torch.jit.load(w) if 'torchscript' in w else attempt_load(weights, map_location=device)
File "C:\Users\shiro\Desktop\01\yolov5-mask-42-master\models\experimental.py", line 96, in attempt_load
ckpt = torch.load(attempt_download(w), map_location=map_location) # load
File "C:\Users\shiro\miniconda3\envs\tf2.3\lib\site-packages\torch\serialization.py", line 581, in load
with _open_file_like(f, 'rb') as opened_file:
File "C:\Users\shiro\miniconda3\envs\tf2.3\lib\site-packages\torch\serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "C:\Users\shiro\miniconda3\envs\tf2.3\lib\site-packages\torch\serialization.py", line 211, in __init__
super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'runs\\train\\exp_yolov5s\\weights\\best.pt'
@FishC |
|