mindyolo
mindyolo copied to clipboard
windows 下 执行train.py 训练yolov8报错
环境是win11,cpu, mindspore 2.1.1,python 3.9
报错信息如下。
[INFO] albumentations load success
albumentations: Blur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))
albumentations: Blur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))[INFO] albumentations load success
albumentations: Blur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))
albumentations: Blur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))[INFO] albumentations load success
[INFO] albumentations load success
[INFO] albumentations load success
Traceback (most recent call last):
File "D:\code\yolov8-train-hw\train.py", line 321, in <module>
train(args)
File "D:\code\yolov8-train-hw\train.py", line 276, in train
trainer.train(
File "D:\code\yolov8-train-hw\mindyolo\utils\trainer_factory.py", line 170, in train
run_context.loss, run_context.lr = self.train_step(imgs, labels, segments,
File "D:\code\yolov8-train-hw\mindyolo\utils\trainer_factory.py", line 366, in train_step
loss, loss_item, _, grads_finite = self.train_step_fn(imgs, labels, True)
File "D:\sdk\miniconda3\envs\yolov8-train-hw\lib\site-packages\mindspore\common\api.py", line 807, in staging_specialize
out = _MindsporeFunctionExecutor(func, hash_obj, input_signature, process_obj, jit_config)(*args, **kwargs)
File "D:\sdk\miniconda3\envs\yolov8-train-hw\lib\site-packages\mindspore\common\api.py", line 106, in wrapper
results = fn(*arg, **kwargs)
File "D:\sdk\miniconda3\envs\yolov8-train-hw\lib\site-packages\mindspore\common\api.py", line 526, in __call__
raise err
File "D:\sdk\miniconda3\envs\yolov8-train-hw\lib\site-packages\mindspore\common\api.py", line 523, in __call__
phase = self.compile(self.fn.__name__, *args_list, **kwargs)
File "D:\sdk\miniconda3\envs\yolov8-train-hw\lib\site-packages\mindspore\common\api.py", line 599, in compile
is_compile = self._graph_executor.compile(self.fn, compile_args, kwargs, phase, True)
RuntimeError: could not create a primitive
当前还未适配window平台,报错看起来应该是图编译的时候出问题了,可以试一下推理看看能不能跑