首页 / 浏览问题 / 桌面GIS / 问题详情
机器学习模型训练报错
28EXP 2024年05月28日
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\SuperMap\SuperMap iDesktopX 11i\resources\python-helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "C:\SuperMap\SuperMap iDesktopX 11i\resources\python-helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:\Users\admin\AppData\Local\Temp\model_train_31.py", line 11, in <module>
    ImageryTrainer(train_data_path=r"E:\yaogantest\self-running training\tank\training_data_2609",config=r"C:\SuperMap\SuperMap iDesktopX 11i\resources_ml\trainer_config\object_detection\object_det_mmdet_rtmdet.sdt",epoch=int(10),batch_size=int(1),lr=1.0E-4,output_model_path=r"E:\yaogantest\self-running training\tank",output_model_name=r"saved_model_2609",backbone_name=r"cspnext-tiny",backbone_weight_path=r"C:\SuperMap\SuperMap iDesktopX 11i\resources_ml\backbone\cspnext-tiny_imagenet_600e.pth",log_path=r"E:\yaogantest\self-running training\log file\0528tank\2609\20240528_095046",reload_model=False,pretrained_model_path=r"E:\yaogantest\self-running training\tank\training_data_2608\saved_model_2608\saved_model_2608.sdm",gpus=[0]).object_detect_train()
  File "I:\teamctiy\BuildAgent\work\test_111x/iobjectspy/ml\vision\_trainer.py", line 83, in object_detect_train
  File "I:\teamctiy\BuildAgent\work\test_111x/iobjectspy/ml\vision\_trainer_collector\object_detection_train.py", line 33, in train
  File "I:\teamctiy\BuildAgent\work\test_111x/iobjectspy/ml\vision\_trainer_collector\object_detection_train.py", line 67, in mmdet_pytorch
  File "I:\teamctiy\BuildAgent\work\test_111x/iobjectspy/ml\vision\_models\base_framework\_mmdet\common_train_mmdet.py", line 538, in train
  File "I:\teamctiy\BuildAgent\work\test_111x/iobjectspy/ml\vision\_models\base_framework\_mmdet\common_train_mmdet.py", line 498, in main_train
  File "E:\yaogan\environment\conda\lib\site-packages\mmengine\runner\runner.py", line 1701, in train
    self._train_loop = self.build_train_loop(
  File "E:\yaogan\environment\conda\lib\site-packages\mmengine\runner\runner.py", line 1493, in build_train_loop
    loop = LOOPS.build(
  File "E:\yaogan\environment\conda\lib\site-packages\mmengine\registry\registry.py", line 570, in build
    return self.build_func(cfg, *args, **kwargs, registry=self)
  File "E:\yaogan\environment\conda\lib\site-packages\mmengine\registry\build_functions.py", line 144, in build_from_cfg
    raise type(e)(
FileNotFoundError: class `EpochBasedTrainLoop` in mmengine/runner/loops.py: class `SMVOCDataset` in iobjectspy/ml/vision/_models/base_framework/_mmdet/data/voc.py: [Errno 2] No such file or directory: 'E:\\yaogantest\\self-running training\\tank\\training_data_2609\\Annotations\\.xml'

问题关闭原因: 无法上传图片

1个回答

报错提示文件找不到,应该是路径解析问题,路径里有空格;不建议路径带有中文、空格等特殊字符。

建议修改目录试试。
1,520EXP 2024年05月28日
...