MindYolo 实例分割 报错, 大家有这个方面的视频和教程给分享下吧,教程太难找了。
收藏回复举报
MindYolo 实例分割 报错, 大家有这个方面的视频和教程给分享下吧,教程太难找了。
t('forum.solved') 已解决
新人帖
发表于2025-08-13 17:54:16
0 查看

2025-08-13 17:02:10,708 [WARNING] The first epoch will be compiled for the graph, which may take a long time; You can come back later :).

[ERROR] ANALYZER(819407,ffffb78d8020,python):2025-08-13-17:02:11.942.296 [mindspore/ccsrc/pipeline/jit/ps/static_analysis/evaluator.cc:717] Run] Primitive: <StandardPrimEvaluator_Conv2D> infer failed, failed info: For primitive[Conv2D], the input type must be same.

name:[w]:Ref[Tensor[Float32]].

name:[x]:Tensor[UInt8].

----------------------------------------------------

- C++ Call Stack: (For framework developers)

----------------------------------------------------

mindspore/core/utils/check_convert_utils.cc:1137 CheckTypeSame

----------------------------------------------------

- The Traceback of Net Construct Code:

----------------------------------------------------

# 0 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:115, 19~41

            return train_step_func(*args)

                   ^~~~~~~~~~~~~~~~~~~~~~

# 1 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:97~98, 12~99

            if clip_grad:

# 2 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:92, 40~62

            (loss, loss_items), grads = grad_fn(x, label, seg)

                                        ^~~~~~~~~~~~~~~~~~~~~~

# 3 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/ops/composite/base.py:597, 31~56

                        return grad_(fn, weights)(*args)

                               ^~~~~~~~~~~~~~~~~~~~~~~~~

# 4 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:84, 19~29

            pred = network(x)

                   ^~~~~~~~~~

# 5 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~28

        return self.model(x)

               ^~~~~~~~~~~~~

# 6 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~25

        return self.model(x)

               ^~~~~~~~~~

# 7 In file /opt/mindyolo/mindyolo/models/model_factory.py:67~85, 8~51

        for i in range(len(self.model)):

# 8 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~25

        return self.model(x)

               ^~~~~~~~~~

# 9 In file /opt/mindyolo/mindyolo/models/model_factory.py:83, 16~20

            x = m(x)  # run

                ^~~~

# 10 In file /opt/mindyolo/mindyolo/models/layers/conv.py:59, 32~44

        return self.act(self.bn(self.conv(x)))

                                ^~~~~~~~~~~~

# 11 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/nn/layer/conv.py:367~368, 8~53

        if self.has_bias:

# 12 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/nn/layer/conv.py:366, 17~44

        output = self.conv2d(x, self.weight)

                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~

 (See file '/opt/mindyolo/rank_0/om/analyze_fail.ir' for more details. Get instructions about `analyze_fail.ir` at https://www.mindspore.cn/search?inputValue=analyze_fail.ir)

Traceback (most recent call last):

  File "/opt/mindyolo/train.py", line 336, in <module>

    train(args)

  File "/opt/mindyolo/train.py", line 291, in train

    trainer.train(

  File "/opt/mindyolo/mindyolo/utils/trainer_factory.py", line 170, in train

    run_context.loss, run_context.lr = self.train_step(imgs, labels, segments,

  File "/opt/mindyolo/mindyolo/utils/trainer_factory.py", line 368, in train_step

    loss, loss_item, _, grads_finite = self.train_step_fn(imgs, labels, segments, True)

  File "/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/common/api.py", line 1224, in staging_specialize

    out = ms_function_executor(*args, **kwargs)

  File "/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/common/api.py", line 180, in wrapper

    results = fn(*arg, **kwargs)

  File "/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/common/api.py", line 669, in __call__

    raise err

  File "/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/common/api.py", line 666, in __call__

    phase = self.compile(self.fn.__name__, *args_list, **kwargs)

  File "/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/common/api.py", line 772, in compile

    is_compile = self._graph_executor.compile(self.fn, compile_args, kwargs, phase)

TypeError: For primitive[Conv2D], the input type must be same.

name:[w]:Ref[Tensor[Float32]].

name:[x]:Tensor[UInt8].

----------------------------------------------------

- C++ Call Stack: (For framework developers)

----------------------------------------------------

mindspore/core/utils/check_convert_utils.cc:1137 CheckTypeSame

----------------------------------------------------

- The Traceback of Net Construct Code:

----------------------------------------------------

# 0 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:115, 19~41

            return train_step_func(*args)

                   ^~~~~~~~~~~~~~~~~~~~~~

# 1 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:97~98, 12~99

            if clip_grad:

# 2 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:92, 40~62

            (loss, loss_items), grads = grad_fn(x, label, seg)

                                        ^~~~~~~~~~~~~~~~~~~~~~

# 3 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/ops/composite/base.py:597, 31~56

                        return grad_(fn, weights)(*args)

                               ^~~~~~~~~~~~~~~~~~~~~~~~~

# 4 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:84, 19~29

            pred = network(x)

                   ^~~~~~~~~~

# 5 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~28

        return self.model(x)

               ^~~~~~~~~~~~~

# 6 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~25

        return self.model(x)

               ^~~~~~~~~~

# 7 In file /opt/mindyolo/mindyolo/models/model_factory.py:67~85, 8~51

        for i in range(len(self.model)):

# 8 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~25

        return self.model(x)

               ^~~~~~~~~~

# 9 In file /opt/mindyolo/mindyolo/models/model_factory.py:83, 16~20

            x = m(x)  # run

                ^~~~

# 10 In file /opt/mindyolo/mindyolo/models/layers/conv.py:59, 32~44

        return self.act(self.bn(self.conv(x)))

                                ^~~~~~~~~~~~

# 11 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/nn/layer/conv.py:367~368, 8~53

        if self.has_bias:

# 12 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/nn/layer/conv.py:366, 17~44

        output = self.conv2d(x, self.weight)

                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~

 (See file '/opt/mindyolo/rank_0/om/analyze_fail.ir' for more details. Get instructions about `analyze_fail.ir` at https://www.mindspore.cn/search?inputValue=analyze_fail.ir)

(mindyolomaster) root@autodl-container-6ce943a632-58447938:/opt/mindyolo# git pull

Password for 'https://wangqiangqiang@bitbucket.bs2y.com': 

remote: Counting objects: 6, done.

remote: Compressing objects: 100% (6/6), done.

remote: Total 6 (delta 5), reused 0 (delta 0)

Unpacking objects: 100% (6/6), 476 bytes | 238.00 KiB/s, done.

From https://bitbucket.bs2y.com/scm/zstp/mindyolo

   d044490..a6ae59b  master     -> origin/master

Updating d044490..a6ae59b

Fast-forward

 configs/yolov8/seg/yolov8x-seg.yaml | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)

(mindyolomaster) root@autodl-container-6ce943a632-58447938:/opt/mindyolo# python train.py --task segment --weight weight/yolov8-x-seg_300e_mAP_mask_429-b4920557.ckpt --config datasets/seg_cat_dog/seg_cat_dog.yaml --epochs 20

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:10:53.710.337 [mindspore/run_check/_check_version.py:324] MindSpore version 2.6.0 and Ascend AI software package (Ascend Data Center Solution)version 8.2 does not match, the version of software package expect one of ['7.6', '7.7']. Please refer to the match info on: https://www.mindspore.cn/install

/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/numpy/core/getlimits.py:549: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.

  setattr(self, word, getattr(machar, word).flat[0])

/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.

  return self._float_to_str(self.smallest_subnormal)

/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/numpy/core/getlimits.py:549: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.

  setattr(self, word, getattr(machar, word).flat[0])

/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.

  return self._float_to_str(self.smallest_subnormal)

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:10:55.924.466 [mindspore/run_check/_check_version.py:342] MindSpore version 2.6.0 and "te" wheel package version 8.2 does not match. For details, refer to the installation guidelines: https://www.mindspore.cn/install

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:10:55.924.624 [mindspore/run_check/_check_version.py:355] Please pay attention to the above warning, countdown: 3

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:10:56.925.767 [mindspore/run_check/_check_version.py:355] Please pay attention to the above warning, countdown: 2

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:10:57.926.607 [mindspore/run_check/_check_version.py:355] Please pay attention to the above warning, countdown: 1

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:11:00.956.646 [mindspore/run_check/_check_version.py:324] MindSpore version 2.6.0 and Ascend AI software package (Ascend Data Center Solution)version 8.2 does not match, the version of software package expect one of ['7.6', '7.7']. Please refer to the match info on: https://www.mindspore.cn/install

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:11:00.957.438 [mindspore/run_check/_check_version.py:342] MindSpore version 2.6.0 and "te" wheel package version 8.2 does not match. For details, refer to the installation guidelines: https://www.mindspore.cn/install

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:11:00.957.519 [mindspore/run_check/_check_version.py:355] Please pay attention to the above warning, countdown: 3

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:11:01.958.607 [mindspore/run_check/_check_version.py:355] Please pay attention to the above warning, countdown: 2

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:11:02.959.901 [mindspore/run_check/_check_version.py:355] Please pay attention to the above warning, countdown: 1

2025-08-13 17:11:03,978 [INFO] parse_args:

2025-08-13 17:11:03,978 [INFO] task                                    segment

2025-08-13 17:11:03,978 [INFO] device_target                           Ascend

2025-08-13 17:11:03,978 [INFO] save_dir                                ./runs/2025.08.13-17.11.03

2025-08-13 17:11:03,978 [INFO] log_level                               INFO

2025-08-13 17:11:03,978 [INFO] is_parallel                             False

2025-08-13 17:11:03,978 [INFO] ms_mode                                 0

2025-08-13 17:11:03,978 [INFO] max_call_depth                          2000

2025-08-13 17:11:03,978 [INFO] ms_amp_level                            O0

2025-08-13 17:11:03,978 [INFO] keep_loss_fp32                          True

2025-08-13 17:11:03,978 [INFO] anchor_base                             False

2025-08-13 17:11:03,978 [INFO] ms_loss_scaler                          static

2025-08-13 17:11:03,978 [INFO] ms_loss_scaler_value                    1024.0

2025-08-13 17:11:03,978 [INFO] ms_jit                                  True

2025-08-13 17:11:03,978 [INFO] ms_enable_graph_kernel                  False

2025-08-13 17:11:03,978 [INFO] ms_datasink                             False

2025-08-13 17:11:03,978 [INFO] overflow_still_update                   False

2025-08-13 17:11:03,978 [INFO] clip_grad                               True

2025-08-13 17:11:03,978 [INFO] clip_grad_value                         10.0

2025-08-13 17:11:03,978 [INFO] ema                                     True

2025-08-13 17:11:03,978 [INFO] weight                                  weight/yolov8-x-seg_300e_mAP_mask_429-b4920557.ckpt

2025-08-13 17:11:03,978 [INFO] ema_weight                              

2025-08-13 17:11:03,978 [INFO] freeze                                  []

2025-08-13 17:11:03,978 [INFO] epochs                                  20

2025-08-13 17:11:03,978 [INFO] per_batch_size                          1

2025-08-13 17:11:03,978 [INFO] img_size                                640

2025-08-13 17:11:03,978 [INFO] nbs                                     64

2025-08-13 17:11:03,978 [INFO] accumulate                              1

2025-08-13 17:11:03,978 [INFO] auto_accumulate                         False

2025-08-13 17:11:03,978 [INFO] log_interval                            10

2025-08-13 17:11:03,978 [INFO] single_cls                              False

2025-08-13 17:11:03,978 [INFO] sync_bn                                 False

2025-08-13 17:11:03,978 [INFO] keep_checkpoint_max                     100

2025-08-13 17:11:03,978 [INFO] run_eval                                False

2025-08-13 17:11:03,978 [INFO] conf_thres                              0.001

2025-08-13 17:11:03,978 [INFO] iou_thres                               0.7

2025-08-13 17:11:03,978 [INFO] conf_free                               True

2025-08-13 17:11:03,978 [INFO] rect                                    False

2025-08-13 17:11:03,978 [INFO] nms_time_limit                          20.0

2025-08-13 17:11:03,978 [INFO] recompute                               True

2025-08-13 17:11:03,978 [INFO] recompute_layers                        2

2025-08-13 17:11:03,978 [INFO] seed                                    2

2025-08-13 17:11:03,978 [INFO] summary                                 True

2025-08-13 17:11:03,978 [INFO] profiler                                False

2025-08-13 17:11:03,978 [INFO] profiler_step_num                       1

2025-08-13 17:11:03,978 [INFO] opencv_threads_num                      0

2025-08-13 17:11:03,978 [INFO] strict_load                             False

2025-08-13 17:11:03,978 [INFO] enable_modelarts                        False

2025-08-13 17:11:03,978 [INFO] data_url                                

2025-08-13 17:11:03,978 [INFO] ckpt_url                                

2025-08-13 17:11:03,978 [INFO] multi_data_url                          

2025-08-13 17:11:03,978 [INFO] pretrain_url                            

2025-08-13 17:11:03,978 [INFO] train_url                               

2025-08-13 17:11:03,978 [INFO] data_dir                                /cache/data/

2025-08-13 17:11:03,978 [INFO] ckpt_dir                                /cache/pretrain_ckpt/

2025-08-13 17:11:03,978 [INFO] network.model_name                      yolov8

2025-08-13 17:11:03,978 [INFO] network.nc                              80

2025-08-13 17:11:03,978 [INFO] network.reg_max                         16

2025-08-13 17:11:03,978 [INFO] network.stride                          [8, 16, 32]

2025-08-13 17:11:03,978 [INFO] network.backbone                        [[-1, 1, 'ConvNormAct', [64, 3, 2]], [-1, 1, 'ConvNormAct', [128, 3, 2]], [-1, 3, 'C2f', [128, True]], [-1, 1, 'ConvNormAct', [256, 3, 2]], [-1, 6, 'C2f', [256, True]], [-1, 1, 'ConvNormAct', [512, 3, 2]], [-1, 6, 'C2f', [512, True]], [-1, 1, 'ConvNormAct', [1024, 3, 2]], [-1, 3, 'C2f', [1024, True]], [-1, 1, 'SPPF', [1024, 5]]]

2025-08-13 17:11:03,978 [INFO] network.head                            [[-1, 1, 'Upsample', ['None', 2, 'nearest']], [[-1, 6], 1, 'Concat', [1]], [-1, 3, 'C2f', [512]], [-1, 1, 'Upsample', ['None', 2, 'nearest']], [[-1, 4], 1, 'Concat', [1]], [-1, 3, 'C2f', [256]], [-1, 1, 'ConvNormAct', [256, 3, 2]], [[-1, 12], 1, 'Concat', [1]], [-1, 3, 'C2f', [512]], [-1, 1, 'ConvNormAct', [512, 3, 2]], [[-1, 9], 1, 'Concat', [1]], [-1, 3, 'C2f', [1024]], [[15, 18, 21], 1, 'YOLOv8SegHead', ['nc', 'reg_max', 32, 256, 'stride']]]

2025-08-13 17:11:03,978 [INFO] network.depth_multiple                  1.0

2025-08-13 17:11:03,978 [INFO] network.width_multiple                  1.25

2025-08-13 17:11:03,978 [INFO] network.max_channels                    512

2025-08-13 17:11:03,978 [INFO] optimizer.optimizer                     momentum

2025-08-13 17:11:03,978 [INFO] optimizer.lr_init                       0.001

2025-08-13 17:11:03,978 [INFO] optimizer.momentum                      0.937

2025-08-13 17:11:03,978 [INFO] optimizer.nesterov                      True

2025-08-13 17:11:03,978 [INFO] optimizer.loss_scale                    1.0

2025-08-13 17:11:03,978 [INFO] optimizer.warmup_epochs                 3

2025-08-13 17:11:03,978 [INFO] optimizer.warmup_momentum               0.8

2025-08-13 17:11:03,978 [INFO] optimizer.warmup_bias_lr                0.1

2025-08-13 17:11:03,978 [INFO] optimizer.min_warmup_step               1000

2025-08-13 17:11:03,978 [INFO] optimizer.group_param                   yolov8

2025-08-13 17:11:03,978 [INFO] optimizer.gp_weight_decay               0.0010078125

2025-08-13 17:11:03,978 [INFO] optimizer.start_factor                  1.0

2025-08-13 17:11:03,978 [INFO] optimizer.end_factor                    0.01

2025-08-13 17:11:03,978 [INFO] optimizer.epochs                        20

2025-08-13 17:11:03,978 [INFO] optimizer.nbs                           64

2025-08-13 17:11:03,978 [INFO] optimizer.accumulate                    1

2025-08-13 17:11:03,978 [INFO] optimizer.total_batch_size              1

2025-08-13 17:11:03,978 [INFO] loss.name                               YOLOv8SegLoss

2025-08-13 17:11:03,978 [INFO] loss.box                                7.5

2025-08-13 17:11:03,978 [INFO] loss.cls                                0.5

2025-08-13 17:11:03,978 [INFO] loss.dfl                                1.5

2025-08-13 17:11:03,978 [INFO] loss.reg_max                            16

2025-08-13 17:11:03,978 [INFO] loss.nm                                 32

2025-08-13 17:11:03,978 [INFO] loss.overlap                            True

2025-08-13 17:11:03,978 [INFO] loss.max_object_num                     600

2025-08-13 17:11:03,978 [INFO] data.num_parallel_workers               8

2025-08-13 17:11:03,978 [INFO] data.train_transforms                   []

2025-08-13 17:11:03,978 [INFO] data.test_transforms                    []

2025-08-13 17:11:03,978 [INFO] data.dataset_name                       cat_dog_seg

2025-08-13 17:11:03,978 [INFO] data.train_set                          /opt/mindyolo/datasets/seg_cat_dog/train.txt

2025-08-13 17:11:03,978 [INFO] data.val_set                            /opt/mindyolo/datasets/seg_cat_dog/val.txt

2025-08-13 17:11:03,978 [INFO] data.test_set                           /opt/mindyolo/datasets/seg_cat_dog/test.txt

2025-08-13 17:11:03,978 [INFO] data.nc                                 2

2025-08-13 17:11:03,978 [INFO] data.names                              ['cat', 'dog']

2025-08-13 17:11:03,978 [INFO] config                                  datasets/seg_cat_dog/seg_cat_dog.yaml

2025-08-13 17:11:03,978 [INFO] rank                                    0

2025-08-13 17:11:03,978 [INFO] rank_size                               1

2025-08-13 17:11:03,978 [INFO] total_batch_size                        1

2025-08-13 17:11:03,978 [INFO] callback                                []

2025-08-13 17:11:03,978 [INFO] 

2025-08-13 17:11:03,980 [INFO] Please check the above information for the configurations

2025-08-13 17:11:04,754 [WARNING] Parse Model, args: nearest, keep str type

2025-08-13 17:11:04,906 [WARNING] Parse Model, args: nearest, keep str type

2025-08-13 17:11:05,707 [INFO] number of network params, total: 71.813161M, trainable: 71.752758M

2025-08-13 17:11:05,716 [INFO] Turn on recompute, and the results of the first 2 layers will be recomputed.

[WARNING] DEVICE(845031,ffff982ff020,python):2025-08-13-17:11:06.865.050 [mindspore/ccsrc/plugin/res_manager/ascend/mem_manager/ascend_vmm_adapter.h:152] CheckVmmDriverVersion] Open file /etc/ascend_install.info failed.

[WARNING] DEVICE(845031,ffff982ff020,python):2025-08-13-17:11:06.865.135 [mindspore/ccsrc/plugin/res_manager/ascend/mem_manager/ascend_vmm_adapter.h:180] CheckVmmDriverVersion] Open file /usr/local/Ascend/driver/version.info failed.

2025-08-13 17:11:14,933 [WARNING] Parse Model, args: nearest, keep str type

2025-08-13 17:11:15,084 [WARNING] Parse Model, args: nearest, keep str type

2025-08-13 17:11:15,879 [INFO] number of network params, total: 71.813161M, trainable: 71.752758M

2025-08-13 17:11:15,888 [INFO] Turn on recompute, and the results of the first 2 layers will be recomputed.

2025-08-13 17:11:17,727 [WARNING] Dropping checkpoint parameter `model.model.22.cv3.0.2.weight` with shape `(80, 320, 1, 1)`, which is inconsistent with cell shape `(2, 320, 1, 1)`

2025-08-13 17:11:17,727 [WARNING] Dropping checkpoint parameter `model.model.22.cv3.0.2.bias` with shape `(80,)`, which is inconsistent with cell shape `(2,)`

2025-08-13 17:11:17,728 [WARNING] Dropping checkpoint parameter `model.model.22.cv3.1.2.weight` with shape `(80, 320, 1, 1)`, which is inconsistent with cell shape `(2, 320, 1, 1)`

2025-08-13 17:11:17,728 [WARNING] Dropping checkpoint parameter `model.model.22.cv3.1.2.bias` with shape `(80,)`, which is inconsistent with cell shape `(2,)`

2025-08-13 17:11:17,728 [WARNING] Dropping checkpoint parameter `model.model.22.cv3.2.2.weight` with shape `(80, 320, 1, 1)`, which is inconsistent with cell shape `(2, 320, 1, 1)`

2025-08-13 17:11:17,728 [WARNING] Dropping checkpoint parameter `model.model.22.cv3.2.2.bias` with shape `(80,)`, which is inconsistent with cell shape `(2,)`

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:11:17.750.623 [mindspore/train/serialization.py:1770] For 'load_param_into_net', 6 parameters in the 'net' are not loaded, because they are not in the 'parameter_dict', please check whether the network structure is consistent when training and loading checkpoint.

[WARNING] ME(845031:281473235021856,MainProcess):2025-08-13-17:11:17.750.856 [mindspore/train/serialization.py:1774] ['model.model.22.cv3.0.2.weight', 'model.model.22.cv3.0.2.bias', 'model.model.22.cv3.1.2.weight', 'model.model.22.cv3.1.2.bias', 'model.model.22.cv3.2.2.weight', 'model.model.22.cv3.2.2.bias'] are not loaded.

2025-08-13 17:11:17,750 [INFO] Pretrain model load from "weight/yolov8-x-seg_300e_mAP_mask_429-b4920557.ckpt" success.

.2025-08-13 17:11:23,895 [INFO] ema_weight not exist, default pretrain weight is currently used.

2025-08-13 17:11:23,898 [INFO] Dataset Cache file hash/version check success.

2025-08-13 17:11:23,898 [INFO] Load dataset cache from [/opt/mindyolo/datasets/seg_cat_dog/train.cache.npy] success.

Scanning '/opt/mindyolo/datasets/seg_cat_dog/train.cache.npy' images and labels... 46 found, 0 missing, 0 empty, 0 corrupted: 100%|████████████████████████████████████████| 46/46 [00:00<?, ?it/s]

2025-08-13 17:11:23,901 [INFO] Dataloader num parallel workers: [8]

2025-08-13 17:11:25,120 [INFO] Registry(name=callback, total=4)

2025-08-13 17:11:25,120 [INFO]   (0): YoloxSwitchTrain in mindyolo/utils/callback.py

2025-08-13 17:11:25,120 [INFO]   (1): EvalWhileTrain in mindyolo/utils/callback.py

2025-08-13 17:11:25,120 [INFO]   (2): SummaryCallback in mindyolo/utils/callback.py

2025-08-13 17:11:25,120 [INFO]   (3): ProfilerCallback in mindyolo/utils/callback.py

2025-08-13 17:11:25,120 [INFO] 

2025-08-13 17:11:25,129 [INFO] got 1 active callback as follows:

2025-08-13 17:11:25,129 [INFO] SummaryCallback()

2025-08-13 17:11:25,129 [WARNING] The first epoch will be compiled for the graph, which may take a long time; You can come back later :).

[ERROR] ANALYZER(845031,ffff982ff020,python):2025-08-13-17:11:26.474.019 [mindspore/ccsrc/pipeline/jit/ps/static_analysis/evaluator.cc:717] Run] Primitive: <StandardPrimEvaluator_Conv2D> infer failed, failed info: For primitive[Conv2D], the input type must be same.

name:[w]:Ref[Tensor[Float32]].

name:[x]:Tensor[UInt8].

----------------------------------------------------

- C++ Call Stack: (For framework developers)

----------------------------------------------------

mindspore/core/utils/check_convert_utils.cc:1137 CheckTypeSame

----------------------------------------------------

- The Traceback of Net Construct Code:

----------------------------------------------------

# 0 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:115, 19~41

            return train_step_func(*args)

                   ^~~~~~~~~~~~~~~~~~~~~~

# 1 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:97~98, 12~99

            if clip_grad:

# 2 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:92, 40~62

            (loss, loss_items), grads = grad_fn(x, label, seg)

                                        ^~~~~~~~~~~~~~~~~~~~~~

# 3 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/ops/composite/base.py:597, 31~56

                        return grad_(fn, weights)(*args)

                               ^~~~~~~~~~~~~~~~~~~~~~~~~

# 4 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:84, 19~29

            pred = network(x)

                   ^~~~~~~~~~

# 5 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~28

        return self.model(x)

               ^~~~~~~~~~~~~

# 6 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~25

        return self.model(x)

               ^~~~~~~~~~

# 7 In file /opt/mindyolo/mindyolo/models/model_factory.py:67~85, 8~51

        for i in range(len(self.model)):

# 8 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~25

        return self.model(x)

               ^~~~~~~~~~

# 9 In file /opt/mindyolo/mindyolo/models/model_factory.py:83, 16~20

            x = m(x)  # run

                ^~~~

# 10 In file /opt/mindyolo/mindyolo/models/layers/conv.py:59, 32~44

        return self.act(self.bn(self.conv(x)))

                                ^~~~~~~~~~~~

# 11 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/nn/layer/conv.py:367~368, 8~53

        if self.has_bias:

# 12 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/nn/layer/conv.py:366, 17~44

        output = self.conv2d(x, self.weight)

                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~

 (See file '/opt/mindyolo/rank_0/om/analyze_fail.ir' for more details. Get instructions about `analyze_fail.ir` at https://www.mindspore.cn/search?inputValue=analyze_fail.ir)

Traceback (most recent call last):

  File "/opt/mindyolo/train.py", line 336, in <module>

    train(args)

  File "/opt/mindyolo/train.py", line 291, in train

    trainer.train(

  File "/opt/mindyolo/mindyolo/utils/trainer_factory.py", line 170, in train

    run_context.loss, run_context.lr = self.train_step(imgs, labels, segments,

  File "/opt/mindyolo/mindyolo/utils/trainer_factory.py", line 368, in train_step

    loss, loss_item, _, grads_finite = self.train_step_fn(imgs, labels, segments, True)

  File "/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/common/api.py", line 1224, in staging_specialize

    out = ms_function_executor(*args, **kwargs)

  File "/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/common/api.py", line 180, in wrapper

    results = fn(*arg, **kwargs)

  File "/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/common/api.py", line 669, in __call__

    raise err

  File "/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/common/api.py", line 666, in __call__

    phase = self.compile(self.fn.__name__, *args_list, **kwargs)

  File "/root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/common/api.py", line 772, in compile

    is_compile = self._graph_executor.compile(self.fn, compile_args, kwargs, phase)

TypeError: For primitive[Conv2D], the input type must be same.

name:[w]:Ref[Tensor[Float32]].

name:[x]:Tensor[UInt8].

----------------------------------------------------

- C++ Call Stack: (For framework developers)

----------------------------------------------------

mindspore/core/utils/check_convert_utils.cc:1137 CheckTypeSame

----------------------------------------------------

- The Traceback of Net Construct Code:

----------------------------------------------------

# 0 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:115, 19~41

            return train_step_func(*args)

                   ^~~~~~~~~~~~~~~~~~~~~~

# 1 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:97~98, 12~99

            if clip_grad:

# 2 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:92, 40~62

            (loss, loss_items), grads = grad_fn(x, label, seg)

                                        ^~~~~~~~~~~~~~~~~~~~~~

# 3 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/ops/composite/base.py:597, 31~56

                        return grad_(fn, weights)(*args)

                               ^~~~~~~~~~~~~~~~~~~~~~~~~

# 4 In file /opt/mindyolo/mindyolo/utils/train_step_factory.py:84, 19~29

            pred = network(x)

                   ^~~~~~~~~~

# 5 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~28

        return self.model(x)

               ^~~~~~~~~~~~~

# 6 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~25

        return self.model(x)

               ^~~~~~~~~~

# 7 In file /opt/mindyolo/mindyolo/models/model_factory.py:67~85, 8~51

        for i in range(len(self.model)):

# 8 In file /opt/mindyolo/mindyolo/models/yolov8.py:35, 15~25

        return self.model(x)

               ^~~~~~~~~~

# 9 In file /opt/mindyolo/mindyolo/models/model_factory.py:83, 16~20

            x = m(x)  # run

                ^~~~

# 10 In file /opt/mindyolo/mindyolo/models/layers/conv.py:59, 32~44

        return self.act(self.bn(self.conv(x)))

                                ^~~~~~~~~~~~

# 11 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/nn/layer/conv.py:367~368, 8~53

        if self.has_bias:

# 12 In file /root/ENTER/envs/mindyolomaster/lib/python3.9/site-packages/mindspore/nn/layer/conv.py:366, 17~44

        output = self.conv2d(x, self.weight)

                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~

 (See file '/opt/mindyolo/rank_0/om/analyze_fail.ir' for more details. Get instructions about `analyze_fail.ir` at https://www.mindspore.cn/search?inputValue=analyze_fail.ir)

我要发帖子