# MindSpore常见报错问题和解决方案

MindSpore常见问题主要包括数据处理问题、模型构建与训练问题、分布式并行配置问题、模型精度和性能调优、模型推理问题以及模型迁移问题等。MindSpore在不同场景下，积累了大量常见的问题案例（持续更新中）。以下是不同类型问题对应的案例列表。

**分类一：数据处理报错案例**

[2.1 MindSpore数据集加载-调试小工具 py-spy](数据集加载-调试小工具-py-spy.md)

[2.2 【MindData】如何将自有数据高效的生成MindRecord格式数据集，并且防止爆内存](如何将自有数据高效的生成MindRecord格式数据集-并且防止爆内存.md)

[2.3 【MindSpore Dataset】在使用Dataset处理数据过程中内存占用高，怎么优化？](在使用Dataset处理数据过程中内存占用高-怎么优化.md)

[2.4 如何处理数据集加载多进程\(multiprocessing\)错误](如何处理数据集加载多进程(multiprocessing)错误.md)

[2.5 MindRecord-Windows下中文路径问题Unexpected error. Failed to open file](MindRecord-Windows下中文路径问题Unexpected-error-Failed-to-open-file.md)

[2.6 MindRecord数据集格式-Windows下数据集报错Invalid file, DB file can not match](MindRecord数据集格式-Windows下数据集报错Invalid-file-DB-file-can-not-match.md)

[2.7 MindSpore数据集加载-GeneratorDataset卡住、卡死](数据集加载-GeneratorDataset卡住-卡死.md)

[2.8 MindSpore-GeneratorDataset报错误Unexpected error. Invalid data type.](GeneratorDataset报错误Unexpected-error-Invalid-data-type.md)

[2.9 MindSpore数据集加载-GeneratorDataset数据处理报错：The pointer cnode is null](数据集加载-GeneratorDataset数据处理报错-The-pointer-cnode-is-null.md)

[2.10 MindSpore数据集报错【The data pipeline is not a tree】](数据集报错-The-data-pipeline-is-not-a-tree.md)

[2.11 MindSpore数据增强报错：Use Decode\(\) for encoded data or ToPIL\(\)for decoded data.](数据增强报错-Use-Decode()-for-encoded-data-or-ToPIL().md)

[2.12 MindSpore自定义数据增强报错【args should be Numpy narray.Got <class 'tuple'\>】](自定义数据增强报错args-should-be-Numpy-narray-Got-class-tuple-gt.md)

[2.13 MindSpore数据集加载-GeneratorDataset功能及常见问题](数据集加载-GeneratorDataset功能及常见问题.md)

[2.14 MindSpore数据加载报错【too many open files】](数据加载--too-many-open-files-错误.md)

[2.15 MindSpore数据增强报错【TypeError: Invalid with type】](数据增强--TypeError-Invalid-with-type-错误.md)

[2.16 MindSpore数据集格式报错【MindRecord File could not open successfully】](数据集格式--MindRecord-File-could-not-open-successfully-错误.md)

[2.17 MindSpore数据集加载报错【'IdentitySampler' object has no attribute 'child\_sampler'】](数据集加载-has-no-attribute-child_sampler.md)

[2.18 MindSpore数据集加载baoc【'DictIterator' has no attribute 'get\_next'】](数据集加载报错DictIterator-has-no-attribute-get_next.md)

[2.19 MindSpore数据集加载报错【IndexError: list index out of range】](数据集加载报错-IndexError-list-index-out-of-range.md)

[2.20 MindSpore数据增强后，内存不足，自动退出](数据增强后-内存不足-自动退出.md)

[2.21 MindSpore报错RuntimeError: Syntax error. Invalid data, Page size: 1048576 is too small to save a blob row.](报错RuntimeError-Invalid-data-Page-size.md)

[2.22 MindSpore报错TypeError: parse\(\) missing 1 required positional argument:'self'](报错TypeError-parse()-missing-1-required-positional.md)

[2.23 MindSpore报错RuntimeError: Exception thrown from PyFunc.](MindSpore报错RuntimeError-Exception-thrown-from-PyFunc.md)

[2.24 MindSpore报错RuntimeError: Thread ID 140706176251712 Unexpected error.](报错GeneratorDataset-num_workers-8-this-value-is.md)

[2.25 MindSpore报错RuntimeError:the size of column\_names is:1 and number of returned NumPy array is:2](报错RuntimeError-Exception-thrown-from-PyFunc.md)

[2.26 MindSpore报错RuntimeError:Invalid data, the number of schema should be positive but got: 0. Please check the input schema.](报错RuntimeError-Unexpected-error-Invalid-data.md)

[2.27 图像类型错误导致执行报错：TypeError: img should be PIL image or NumPy array. Got <class 'list'\>.](图像类型错误导致执行报错-TypeError-img-should-be-PIL-image-or-NumPy-array-Got-class-list.md)

[2.28 通道顺序错误引起matplotlib.image.imsave执行报错:raise ValueError"Third dimension must be 3 or 4"](通道顺序错误引起matplotlib-image-imsave执行报错-raise-ValueError(-Third-dimension-must-be-3-or-4-).md)

[2.29 cv3.imwrite保存Tensor引起类型报错:cv3.error: OpenCV\(5.7.0\) :-1: error: \(-5:Bad argument\) in function 'imwrite'](cv2-imwrite保存Tensor引起类型报错-cv2-error-OpenCV(4-6-0)--1-error-(-5-Bad-argument)-in-function-imwrite.md)

[2.30 cv2保存图片类型错误执行报错，由于没有将tensor转换为numpy，导致cv3.imwrite运行失败](cv2保存图片类型错误执行报错cv2-error-OpenCV(4-6-0)--1-error-(-5-Bad-argument)-in-function-imwrite---img-is-not-a.md)

[2.31 MindSpore报错RuntimeError: Invalid data, the number of schema should be positive but got: 0. Please checkthe input schema.](MindSpore报错RuntimeError-Invalid-data-the-number-of-schema-should-be-positive-but-got-0-Please-checkt.md)

[2.32 MindSpore报错MRMOpenError: MindRecord File could not open successfully.](MindSpore报错MRMOpenError-MindRecord-File-could-not-open-successfully.md)

[2.33 MindSpore报错RuntimeError: Invalid python function, the 'source' of 'GeneratorDataset' should return same number ...](MindSpore报错RuntimeError-Invalid-python-function-the-source-of-GeneratorDataset-should-return-same-nu.md)

[2.34 MindSpore报错ValueError: when loss\_fn is not None, train\_dataset should return two elements, but got 3](MindSpore报错ValueError-when-loss_fn-is-not-None-train_dataset-should-return-two-elements-but-got-3.md)

[2.35 MindSpore数据类型转换结果不符合预期](MindSpore数据类型转换结果不符合预期.md)

[2.36 MindSpore报错TypeError:parse\(\) missing 1 required positional argument: ‘self’](MindSpore报错TypeError-parse()-missing-1-required-positional-argument-self.md)

[2.37 使用mindspore.ops.interpolate报错ValueError:For "scale\_factor" option cannot currentiy be set with the mode = bilinear = 4D](使用mindspore-ops-interpolate报错ValueError-For-scale_factor-option-cannot-currentiy-be-set-with-the-mod.md)

[2.38 mindspore.dataset.Dataset.split切分数据集时randomize=True时分割出的数据不够随机问题](新节点3mindspore-dataset-Dataset-split切分数据集时randomize-True时分割出的数据不够随机问题.md)

[2.39 MindSpore拆分dataset输入给多输入模型](MindSpore拆分dataset输入给多输入模型.md)

[2.40 使用ImageFolderDataset读取图片在进行PIL转化的时候出现报错](使用ImageFolderDataset读取图片在进行PIL转化的时候出现报错.md)

[2.41 MindSpore如何对使用了自定义采样器的数据集进行分布式采样](MindSpore如何对使用了自定义采样器的数据集进行分布式采样.md)

[2.42 ImageFolderDataset读取图片在进行PIL转化的时候出现报错](ImageFolderDataset读取图片在进行PIL转化的时候出现报错.md)

[2.43 使用MindSpore读取数据报错RuntimeError:Exception thrown from dataset pipeline. Refer to 'Dataset Pipline Error Message'.](使用MindSpore读取数据报错RuntimeError-Exception-thrown-from-dataset-pipeline-Refer-to-Dataset-Pipline-Error.md)

[2.44 使用MindSpore对vision.SlicePatches的数据集切分和合并](使用MindSpore对vision-SlicePatches的数据集切分和合并.md)

[2.45 MindSpore调用Dataset.batch\(\)中per\_batch\_map函数出错](MindSpore调用Dataset-batch()中per_batch_map函数出错.md)

[2.46 使用MindSpore对vision.SlicePatches的数据集切分和合并](使用MindSpore对vision-SlicePatches的数据集切分和合并-0.md)

[2.47 报错：mindspore.\_c\_expression.typing.TensorType object is not callable](报错-mindspore-_c_expression-typing-TensorType-object-is-not-callable.md)

[2.48 Ascend print数据落盘使用](Ascend-print数据落盘使用.md)

[2.49 MindSpore在construct中进行标量计算](MindSpore在construct中进行标量计算.md)

[2.50 MindSpore报错：module 'mindspore.dataset.vision' has no attribute 'Normalize'](MindSpore报错-module-mindspore-dataset-vision-has-no-attribute-Normalize.md)

[2.51 使用Dataset处理数据过程中如何优化内存占用高的问题](使用Dataset处理数据过程中如何优化内存占用高的问题.md)

**分类二：模型构建与训练报错案例**

[3.1 MindSpore报错“RuntimeError: Exceed function call depth limit 1000”](报错RuntimeError-Exceed-function-call-depth-limit-1000.md)

[3.2 MindSpore报错:AttributeError:Tensor has no attribute](报错-AttributeError-Tensor-has-no-attribute.md)

[3.3 MindSpore报错AttributeError:NoneType has no attribute...](报错AttributeError-NoneType-has-no-attribute.md)

[3.4 Mindspore 报错:the dimension of logits must be equal to 2, but got 3](报错-the-dimension-of-logits-must-be-equal-to-2.md)

[3.5 MindSpore报ValueError: For 'Pad', all elements of paddings must be \>= 0.](报错ValueError-For-Pad-all-elements-of-paddings-must-be-0.md)

[3.6 MindSpore报错ValueError:For xx,the x shape:xx must be equal to xxx](报错ValueError-For-xx-the-x-shape-xx-must-be-equal-to-xxx.md)

[3.7 MindSpore报类型错误TypeError: For 'Tensor', the type of input\_data should be one of ''Tensor', 'ndarray','](报类型错误TypeError-For-Tensor-the-type-of-input_data-should-be-one-of.md)

[3.8 MindSpore报错 ScatterNdUpdate这个算子在Ascend硬件上不支持input0是int32的数据类型](报错-ScatterNdUpdate这个算子在Ascend硬件上不支持input0是int32的数据类型.md)

[3.9 MindSpore报错TypeError: ScalarAdd不支持bool类型](报错TypeError-ScalarAdd不支持bool类型-官网缺少说明.md)

[3.10 MindSpore报RuntimeError:ReduceSum算子不支持8维及以上的输入而报错](报RuntimeError-ReduceSum算子不支持8维及以上的输入而报错.md)

[3.11 MindSpore报错:Unsupported parameter type for python primitive, the parameter value is KeywordArg key : axis, value:\(2,3\)](报类型错误-Unsupported-parameter-type-for-python-primitive.md)

[3.12 MindSpore报RuntimeError:Illegal primitive: Primitive ScatterAdd's bprop not defined.](报错RuntimeError-Primitive-ScatterAdd-s-bprop-not-defined.md)

[3.13 MindSpore报运行时错误: x shape的C\_in除以group应等于weight的C\_in](报运行时错误-For-Conv2d-x-shape的C_in除以group应等于weight的C_in.md)

[3.14 昇思报错“input\_x”形状的乘积应等于“input\_shape”的乘积，但“input\_x”形状的积为65209，“input\_sshape”的积为65308。](报错-alueError-For-Reshape-the-shape-of-input_x-is-65209-the-value-of-input_shape-value-is-16302-4.md)

[3.15 MindSpore报错ValueError:x.shape和y.shape不能广播，得到i:-2，x.shapes:2，5，y.shape:3，5](报错ValueError-For-xxx-x和y的shape不支持-broadcast.md)

[3.16 MindSpore报错ValueError: For 'MatMul', the input dimensions must be equal, but got 'x1\_col': 12800 and 'x2\_row': 10](报错-ValueError-For-MatMul-the-input-dimensions必须相等.md)

[3.17 MindSpore报错：无法在AI CORE或AI CPU内核信息候选列表中为Default/Pow-op0选择有效的内核信息](报错-Can-not-select-a-valid-kernel-info-for-Default-Pow-op0-in-AI-CORE-or-AI-CPU-kernel-info-candidate.md)

[3.18 MindSpore报错ValueError: x rank in NLLLossshould be int and must in 1, 2, but got4with typeint](报错-ValueError-x-rank-in-NLLLoss-should-be-int-and-must-in-1-2-but-got-4-with-type-int.md)

[3.19 MindSpore报错Select GPU kernel op BatchNorm fail! Incompatible data type!](报错-Select-GPU-kernel-op-BatchNorm-fail-Incompatible-data-type.md)

[3.20 MindSpore报错ValueError: For 'MirrorPad', paddings must be a Tensor with type of int64, but got None.](报错-ValueError-For-MirrorPad-paddings-must-be-a-Tensor-with-type-of-int64-but-got-None.md)

[3.21 MindSpore报错 For primitive TensorSummary, the v rank 必须大于等于0](报错-For-primitive-TensorSummary-the-v-rank-必须大于等于0.md)

[3.22 MindSpore报错TypeError: For 'CellList', each cell should be subclass of Cell, but got NoneType.](报错-TypeError-For-CellList-each-cell-should-be-subclass-of-Cell-but-got-NoneType.md)

[3.23 MindSpore报错RuntimeError: Call runtime rtStreamSynchronize failed. Op name: Default/CTCGreedyDecoder-op2](报错-task_fail_info-or-current_graph_-is-nullptr.md)

[3.24 MindSpore报错ValueError：padding\_idx in Embedding超出范围的报错](报错ValueError-padding_idx-in-Embedding超出范围.md)

[3.25 MindSpore报错ValueError: seed2 in StandardNormal should be int and must \>= 0, but got -3 with type int.](报错ValueError-seed2-in-StandardNormal-should-be-int-and-must-0.md)

[3.26 MindSpore报错 Ascend 环境下ReduceMean不支持8维及其以上的输入](报错-Ascend-环境下ReduceMean不支持8维及其以上的输入.md)

[3.27 MindSpore报错： Conv2D第三维输出数据类型必须是正整数或者SHP\_ANY, but got -59](报错-Conv2D第三维输出数据类型必须是正整数或者SHP_ANY.md)

[3.28 MindSpore报错TypeError: 对于TopK的输入类型必须是int32， float16或者float32， 而实际得到的是float65.](报错-For-TopK-the-type-of-x-should-be-one-of-Tensor-Int32.md)

[3.29 MindSpore报错 ValueError:Minimum inputs size 0 does not match the requires signature size 2](报错Minimum-inputs-size-0-does-not-match-the-requires-signature-size-2.md)

[3.30 MindSpore报错ValueError: Currently half\_pixel\_centers=True only support in Ascend device\_target, but got CPU](报错ValueError-Currently-half_pixel_centers-True-only-support-in-Ascend-device_target-but-got-CPU.md)

[3.31 MindSpore报错ValueError:输出形状的每一个值都应该大于零， 实际出现了负数](报错ValueError-For-AvgPool输出形状的每一维都要大于零.md)

[3.32 昇思报错"The function construct need xx positional argument ..."怎么办](报错TypeError-The-function-construct-needs-0-positional-argument-and-0-default-argument-but-provided-1.md)

[3.33 MindSpore报错算子AddN的输入类型\(kNumberTypeBool,kNumberTypeBool\)和输出类型kNumberTypeBool不支持](报错Operator-input(-)-output(-)-is-not-support.md)

[3.34 MindSpore报错should be initialized as a 'Parameter' type in the 'init' function, but got '3.0' with type 'float.](报错-sth-should-be-initialized-as-a-Parameter-type-in.md)

[3.35 MindSpore报错RuntimeError: The 'add' operation does not support the type kMetaTypeNone, Int65.](报错-The-add-operation-does-not-support-the-type-kMetaTypeNone-Int64.md)

[3.36 MindSpore报错：When eval 'Tensor\(self.data, mindspore.float32\)' by using Fallback feature](报错-When-eval-Tensor(self-data-mindspore-float32)-by-using-Fallback-feature-an-error-occurred-data.md)

[3.37 MindSpore报错RuntimeError: Net parameters weight shape xxx i](报错RuntimeError-Net-parameters-weight-shape-((751-512))-is-different-from-parameter_dict-s-((31789-51.md)

[3.38 GPU设备算力不足导致计算结果错误cublasGemmEx failed](GPU设备提示-The-device-with-Cuda-compute-capability-5-2-is-lower-than-the-minimum-required-capability-5.md)

[3.39 GPU环境运行MindSpore报错：设卡失败 SetDevice failed](GPU环境运行MindSpore报错-设卡失败-SetDevice-failed.md)

[3.40 Ascend环境使用mindspore报Total stream number xxx exceeds the limit of 1024, secrch details information in mindspore's FAQ.](Ascend环境使用MindSpore报出如下错误-Total-stream-number-xxx-exceeds-the-limit-of-1024-secrch-details-informati.md)

[3.41 LoadTask Distribute Task Failed 报错解决](LoadTask-Distribute-Task-Failed-报错解决.md)

[3.42 GPU训练提示分配流失败cudaStreamCreate failed](GPU训练提示分配流失败-cudaStreamCreate-failed.md)

[3.43 如何处理GPU训练过程中出现内存申请大小为0的错误【The memory alloc size is 0】](GPU训练过程中报错-The-memory-alloc-size-is-0.md)

[3.44 MindSpore报错ValueError: Please input the correct checkpoint](报错-ValueError-For-load_checkpoint-the-checkpoint.md)

[3.45 加载checkpoint的时候报warning日志 "xxx parameters in the net are not](加载checkpoint的时候报warning日志xxx-parameters-in-the-net-are-not-loaded-because-they-are-not-in-the-parame.md)

[3.46 执行时遇到 For context.set\_context, package type xxx support devic](报错-ValueError-For-context-set_context-package-type-xxx-support-device_target-type-xxx-but-got-xxx.md)

[3.47 MindSpore PyNative模式下The pointer top\_cell\_ is null错误](PyNative模式下The-pointer-top_cell_-is-null错误.md)

[3.48 【MindSpore】Ascend环境运行mindspore脚本报：网络脚本的设备被占用，当前MindSpore框架在Ascend环境只支持每张卡运行一个网络脚本](报错RuntimeError-alloc-device-memory-failed-free-memory-size-is-less-than-half-of-total-memory-size.md)

[3.49 ms报错ValueError: Please input the correct checkpoint](报错ValueError-Please-input-the-correct-checkpoint.md)

[3.50 MindSpore报错ValueError: For 'MatMul', the input dimensions must be equal, but got 'x1\_col': 2 and 'x2\_row': 2.](求导传入sens值时infer报错ValueError-For-MatMul-the-input-dimensions-must-be-equal.md)

[3.51 没有ckpt文件导致模型加载执行报错：ckpt does not exist, please check whether the 'ckpt\_file\_name' is correct.](没有ckpt文件导致模型加载执行报错-please-check-whether-the-ckpt_file_name-is-correct.md)

[3.52 Tensor张量shape不匹配导致执行报错：ValueError:x.shape和y.shape不能广播](Tensor张量shape不匹配导致执行报错-ValueError-For-Sub-x-shape-and-y-shape-are-supposed-to-broadcast.md)

[3.53 自定义loss没有继承nn.Cell导致执行报错：ParseStatement Unsupported statement 'Try'.](自定义loss没有继承nn-Cell导致执行报错-ParseStatement-Unsupported-statement-Try.md)

[3.54 MindSpore:For 'Optimizer',the argument parameters must be Iterable type,but got<class'mindspore.common.tensor.Tensor'\>.](参数类型错误导致优化器执行报错-TypeError-For-Optimizer-the-argument-parameters-must-be-Iterable-type.md)

[3.55 形参与实参的不对应导致ops.GradOperation执行报错：The parameters number of the function is 2, but the number of provided arguments is 2.](形参与实参的不对应导致ops-GradOperation执行报错-The-parameters-number-of-the-function-is-2-but-the-number-of-provid.md)

[3.56 return回来的参数承接问题导致执行报错：AttributeError: 'tuple' object has no attribute 'asnumpy'](return回来的参数承接问题导致执行报错-AttributeError-tuple-object-has-no-attribute-asnumpy.md)

[3.57 维度数错误引起模型输入错误：For primitive Conv2D, the x shape size must be equal to 4, but got 4.](维度数错误引起模型输入错误-For-primitive-Conv2D-the-x-shape-size-must-be-equal-to-4-but-got-3.md)

[3.58 MindSpore报错：The value parameter,it's name 'xxxx' already exsts. please set a unique name for the parameter .](报错-The-value-parameter-it-s-name-xxxx-already-exsts-please-set-a-unique-name-for-the-parameter.md)

[3.59 construct方法名称错误引起损失函数执行报错:The 'sub' operation does not support the type TensorFloat32, None.](construct方法名称错误引起损失函数执行报错-The-sub-operation-does-not-support-the-type-Tensor-Float32-None.md)

[3.60 MindSpore报错RuntimeError:The sub operation does not support the type TensorFloat32, None.](RuntimeError-The-sub-operation-does-not-support-the-type-Tensor-Float32-None.md)

[3.61 注释不当报错：There are incorrect indentations in definition or comment of function: 'Net.construct'.](注释不当报错-There-are-incorrect-indentations-in-definition-or-comment-of-function-Net-construct.md)

[3.62 静态图执行卡死问题：For MakeTuple, the inputs should not be empty..node:xxx](静态图执行卡死问题-For-MakeTuple-the-inputs-should-not-be-empty-node-xxxxxxxxxxxx.md)

[3.63 MindSpore报错: module\(\) takes at most 2 arguments \(3 given\)](报错-module()-takes-at-most-2-arguments-(3-given).md)

[3.64 For ScatterNdAdd, the 3-th value of indices7 is out of range4scatterNdAdd算子报错解决](报错ERROR-For-ScatterNdAdd-the-3-th-value-of-indices-7-is-out-of-range-4-scatterNdAdd.md)

[3.65 使用ops.nonzero算子报错TypeError: Type Join Failed: dtype1 = Float32, dtype2 = Int65.](使用ops-nonzero算子报错TypeError-Type-Join-Failed-dtype1-Float32-dtype2-Int64.md)

[3.66 调用MindSpore内部函数时的语法错误TypeError: module object is not callable](调用MindSpore内部函数时的语法错误TypeError-module-object-is-not-callable.md)

[3.67 MindSpore在静态图模式下使用try语法报错RuntimeError: Unsupported statement Try.](MindSpore在静态图模式下使用try语法报错RuntimeError-Unsupported-statement-Try.md)

[3.68 报错: ValueError: For 'MatMul', the input dimensions must be equal, but got 'x1\_col': 817920 and 'x2\_row': 272640.](MindSpore报错-ValueError-For-MatMul-the-input-dimensions-must-be-equal-but-got-x1_col-817920-and-x2_ro.md)

[3.69 MindSpore 报错提示 DropoutGrad 的bprop反向未定义："Illegal primitive: Primitive DropoutGrad’s bprop not defined."](MindSpore-报错提示-DropoutGrad-的bprop反向未定义-Illegal-primitive-Primitive-DropoutGrad-s-bprop-not-defined.md)

[3.70 MindSpore报错The graph generated form MindIR is not support to execute in the PynativeMode,please convert to the GraphMode](MindSpore报错The-graph-generated-form-MindIR-is-not-support-to-execute-in-the-PynativeMode-please-conv.md)

[3.71 MindSpore报错RuntimeError: For ’Optimizer’, the argument group params must not be empty.](MindSpore报错RuntimeError-For-Optimizer-the-argument-group-params-must-not-be-empty.md)

[3.72 使用mindspore.ops.MaxPool3D算子设置为ceil\_mode=True时，在MindSpore2.8.1和2.9.0版本中计算结果不一致](使用mindspore-ops-MaxPool3D算子设置为ceil_mode-True时-在MindSpore1-8-1和1-9-0版本中计算结果不一致.md)

[3.73 Construct内报错和定位解决](Construct内报错和定位解决.md)

[3.74 gather算子报错：TypeError以及定位解决](gather算子报错-TypeError以及定位解决.md)

[3.75 报错：module\(\) takes at most 2 arguments \(3 given\)](报错-module()-takes-at-most-2-arguments-(3-given)-1.md)

[3.76 注释不当报错：There are incorrect indentations in definition or comment of function: 'Net.construct'.](注释不当报错-There-are-incorrect-indentations-in-definition-or-comment-of-function-Net-construct-2.md)

[3.77 MindSpore报错untimeError: Exceed function call depth limit 1000.](MindSpore报错untimeError-Exceed-function-call-depth-limit-1000.md)

[3.78 MindSpore图编译报错TypeError: ‘int’ object is not iterable.](MindSpore图编译报错TypeError-int-object-is-not-iterable.md)

[3.79 MindSpore报错RuntimeError: The 'getitem' operation does not support the type \[Func, Int64\].](MindSpore报错RuntimeError-The-getitem-operation-does-not-support-the-type-Func-Int64.md)

[3.80 MindSpore cpu版本源码编译失败](MindSpore-cpu版本源码编译失败.md)

[3.81 MindSpore图编译报错TypeError: ‘int’ object is not iterable.](MindSpore图编译报错TypeError-int-object-is-not-iterable-3.md)

[3.82 MindSpore的Cell.insert\_child\_to\_cell 添加层会出现参数名重复](MindSpore的Cell-insert_child_to_cell-添加层会出现参数名重复.md)

[3.83 mindspore.numpy.unique\(\) 不支持 0 shape tensor](mindspore-numpy-unique()-不支持-0-shape-tensor.md)

[3.84 MindSpore直接将Tensor从布尔值转换为浮点数导致错误Error: IndexError: index 1 is out of bounds for dimension with size 1](MindSpore直接将Tensor从布尔值转换为浮点数导致错误Error-IndexError-index-1-is-out-of-bounds-for-dimension-with-size-1.md)

[3.85 MindSpore中的mindspore.numpy.bincount 大数值情况下报ValueError定位与解决](MindSpore中的mindspore-numpy-bincount-大数值情况下报ValueError定位与解决.md)

[3.86 使用mindspore.numpy.broadcast\_to 算子报错及解决](使用mindspore-numpy-broadcast_to-算子报错及解决.md)

[3.87 使用MindSpore中的SoftMax\(\)算子计算单一数据出错Run op inputs type is invalid!](使用MindSpore中的SoftMax()算子计算单一数据出错Run-op-inputs-type-is-invalid.md)

[3.88 CSRTensor 矩阵乘法计算出错RuntimeError:CUDA Error: cudaMemcpy failed.|Error Number: 700 an illegal memory access was encountered](CSRTensor-矩阵乘法计算出错RuntimeError-CUDA-Error-cudaMemcpy-failed-Error-Number-700-an-illegal-memory-acces.md)

[3.89 Cell对象序列化失败-使用pickle.dumps保存到本地后重新加载失败](Cell对象序列化失败-使用pickle-dumps保存到本地后重新加载失败.md)

[3.90 TopK算子返回的全零的Tensor的解决](TopK算子返回的全零的Tensor的解决.md)

[3.91 在NPU上的切片操作x=x\[:,::-1,:,:\]不生效的分析解决](在NPU上的切片操作x-x--1-不生效的分析解决.md)

[3.92 张量运算失败报错RuntimeError:Malloc for kernel output failed, Memory isn’t enough](张量运算失败报错RuntimeError-Malloc-for-kernel-output-failed-Memory-isn-t-enough.md)

[3.93 MindSpore Dump功能使用经验](MindSpore-Dump功能使用经验.md)

[3.94 使用SymbolTree.get\_network处理conv2d算子时报错NameError:name "Cell" is not defined](使用SymbolTree-get_network处理conv2d算子时报错NameError-name-Cell-is-not-defined.md)

[3.95 使用mindspore中Conv2dTranspose的outputpadding时，设置has\_bias=True时失效](使用mindspore中Conv2dTranspose的outputpadding时-设置has_bias-True时失效.md)

[3.96 使用mindspore.ops.pad算子报错位置有误](使用mindspore-ops-pad算子报错位置有误.md)

[3.97 使用mindspore.numpy.sqrt 计算结果不正确](使用mindspore-numpy-sqrt-计算结果不正确.md)

[3.98 函数变换获得梯度计算函数时报错AttributeError: module 'mindspore' has no attribute 'value\_and\_grad'](函数变换获得梯度计算函数时报错AttributeError-module-mindspore-has-no-attribute-value_and_grad.md)

[3.99 自定义ops.Custom报错TypeError: function output\_tensor expects two inputs, but get 1](自定义ops-Custom报错TypeError-function-output_tensor-expects-two-inputs-but-get-1.md)

[3.100 报错ValueError: Input buffer\_size is not within the required interval of \[2, 2147483647\].](报错ValueError-Input-buffer_size-is-not-within-the-required-interval-of-2-2147483647.md)

[3.101 使用MindSpore的LayerNorm报错ValueError: For 'LayerNorm', gamma or beta shape must match input shape.](使用MindSpore的LayerNorm报错ValueError-For-LayerNorm-gamma-or-beta-shape-must-match-input-shape.md)

[3.102 使用nn.pad报错RuntimeError:For 'Pad', output buffer memset failed](使用nn-pad报错RuntimeError-For-Pad-output-buffer-memset-failed.md)

[3.103 使用shard接口遇到空指针的报错RuntineError: The pointer \[comm\_lib\_instance\_\] is null.](使用shard接口遇到空指针的报错RuntineError-The-pointer-comm_lib_instance_-is-null.md)

[3.104 AttributeError: Tensor\[Int64\] object has no attribute: asnumpy](AttributeError-Tensor-Int64-object-has-no-attribute-asnumpy.md)

[3.105 使用计算得到的Tensor进行slicing赋值时报错RuntimeError: The int64\_t value\(-1\) is less than 0.](使用计算得到的Tensor进行slicing赋值时报错RuntimeError-The-int64_t-value(-1)-is-less-than-0.md)

[3.106 总loss由多个loss组成时的组合](总loss由多个loss组成时的组合.md)

[3.107 使用classmindspore\_rl.policy.EpsilonGreedyPolicy发现维度不匹配及解决](使用classmindspore_rl-policy-EpsilonGreedyPolicy发现维度不匹配及解决.md)

[3.108 自定义Callback重载函数调用顺序错误及解决](自定义Callback重载函数调用顺序错误及解决.md)

[3.109 MindSpore报错：all types should be same, but got \[mindspore.tensorfloat64\], \[mindspore.tensor float32\]](MindSpore报错-all-types-should-be-same-but-got-mindspore-tensor-float64-mindspore-tensor-float32.md)

[3.110 MindSpore在GRAPH\_MODE下初始化，报错提示当前的执行模式是禁用了任务下沉（TASK\_SINK）](MindSpore在GRAPH_MODE下初始化-报错提示当前的执行模式是禁用了任务下沉（TASK_SINK）.md)

[3.111 使用vision.ToPIL在一定情况下无效](使用vision-ToPIL在一定情况下无效.md)

[3.112 MindSpore不能像torch的param.grad直接获取梯度问题](MindSpore不能像torch的param-grad直接获取梯度问题.md)

[3.113 MindSpore跑resnet50报错For 'MatMul' the input dimensions must be equal, but got 'x1\_col': 32768 and 'x2\_row': 2048.方法一](MindSpore跑resnet50报错For-MatMul-the-input-dimensions-must-be-equal-but-got-x1_col-32768-and-x2_row-20.md)

[3.114 使用piecewise\_constant\_lr造成梯度异常](新节点24使用piecewise_constant_lr造成梯度异常.md)

[3.115 MindSpore报错AttributeError: module 'mindspore.ops' has no attribute 'mm'](MindSpore报错AttributeError-module-mindspore-ops-has-no-attribute-mm.md)

[3.116 MindSpore报错'Resize' from mindspore.dataset.vision.c\_transforms is deprecated](MindSpore报错-Resize-from-mindspore-dataset-vision-c_transforms-is-deprecated.md)

[3.117 MindSpore中的text\_format.Merge和text\_format.Parse的区别](MindSpore中的text_format-Merge和text_format-Parse的区别.md)

[3.118 MindSpore如何将add\_node函数添加节点信息到self.node中](MindSpore如何将add_node函数添加节点信息到self-node中.md)

[3.119 如何读取MindSpore中的.pb文件中的节点](如何读取MindSpore中的-pb文件中的节点.md)

[3.120 MindSpore报错Please try to reduce 'batch\_size' or check whether exists extra large shape.及解决](MindSpore报错Please-try-to-reduce-batch_size-or-check-whether-exists-extra-large-shape-及解决.md)

[3.121 MindSpore报错RuntimeError: Load op info form json config failed, version: Ascend310](MindSpore报错RuntimeError-Load-op-info-form-json-config-failed-version-Ascend310.md)

[3.122 MindSpore跑resnet50报错For 'MatMul' the input dimensions must be equal, but got 'x1\_col': 32768 and 'x2\_row': 2048.方法二](MindSpore跑resnet50报错For-MatMul-the-input-dimensions-must-be-equal-but-got-x1_col-32768-and-x2_row-20-4.md)

[3.123 使用MindSpore的ops中的矩阵相乘算子进行int8的相乘运算时报错](使用MindSpore的ops中的矩阵相乘算子进行int8的相乘运算时报错.md)

[3.124 使用Mindspore模型训练时出现梯度为0现象](使用Mindspore模型训练时出现梯度为0现象.md)

[3.125 MindSpore开启summary报错ValueError: not enough values to unpack \(expected 4, got 0\)](MindSpore开启summary报错ValueError-not-enough-values-to-unpack-(expected-4-got-0).md)

[3.126 使用MindSpore实现梯度对数据求导retain\_graph=True](使用MindSpore实现梯度对数据求导retain_graph-True.md)

[3.127 使用SummaryRecord记录计算图报错：Failed to get proto for graph.](使用SummaryRecord记录计算图报错-Failed-to-get-proto-for-graph.md)

[3.128 使用MindSpore的initializer生成的Tensor行为不符合预期](使用MindSpore的initializer生成的Tensor行为不符合预期.md)

[3.129 MindSpore的VIT报错\[OneHot\] failed. OneHot: index values should not bigger than num classes: 100, but got: 100.](MindSpore的VIT报错-OneHot-failed-OneHot-index-values-should-not-bigger-than-num-classes-100-but-got-100.md)

[3.130 MindSpore使用run\_pyscf跑量子化学时报错Invalid cross-device link](MindSpore使用run_pyscf跑量子化学时报错Invalid-cross-device-link.md)

[3.131 算子编译过程中报错A module that was compiled using NumPy 2.x cannot be run in Numpy 3.0.0 .](算子编译过程中报错A-module-that-was-compiled-using-NumPy-1-x-cannot-be-run-in-Numpy-2-0-0.md)

[3.132 MindSpore神经网络训练中的梯度消失问题](MindSpore神经网络训练中的梯度消失问题.md)

[3.133 MindSpore报错：The supported input and output data types for the current operator are: node is Default/BitwiseAnd](MindSpore报错-The-supported-input-and-output-data-types-for-the-current-operator-are-node-is-Default-B.md)

[3.134 MindSpore模型加载报错RuntimeError: build from file failed! Error is Common error code.](MindSpore模型加载报错RuntimeError-build-from-file-failed-Error-is-Common-error-code.md)

[3.135 MindSpore模型转换报错RuntimeError: Can not find key SiLU in convert nap. Exporting SiLU operator is not yet supported.](MindSpore模型转换报错RuntimeError-Can-not-find-key-SiLU-in-convert-nap-Exporting-SiLU-operator-is-not-yet.md)

[3.136 MindSpore报错Kernel launch failed, msg: Acl compile and execute failed, op\_type\_:AvgPool3D](MindSpore报错Kernel-launch-failed-msg-Acl-compile-and-execute-failed-op_type_-AvgPool3D.md)

[3.137 MindSpore报错“ValueError: For 'MatMul', the input dimensions必须相等](MindSpore报错-ValueError-For-MatMul-the-input-dimensions必须相等.md)

[3.138 类型报错： 编译报错，编译时报错 “Shape Join Failed”](类型报错-编译报错-编译时报错-Shape-Join-Failed.md)

[3.139 Asttokens版本稳定性性的问题](Asttokens版本稳定性性的问题.md)

[3.140 \[MindSpore报错ValueError: x rank in NLLLoss should be int and must in \[1, 2\], but got 4 with type \`int\]](MindSpore报错ValueError-x-rank-in-NLLLoss-should-be-int-and-must-in-1-2-but-got-4-with-type-int.md)

[3.141 MindSpore PyNative模式下The pointer\[top\_cell\_\] is null错误](MindSpore-PyNative模式下The-pointer-top_cell_-is-null错误.md)

[3.142 MindSpore报错ERROR:PyNative Only support STAND\_ALONE,DATA\_PARALLEL and AUTO\_PARALLEL under shard function for ParallelMode](MindSpore报错ERROR-PyNative-Only-support-STAND_ALONE-DATA_PARALLEL-and-AUTO_PARALLEL-under-shard-funct.md)

[3.143 LeNet-5实际应用中报错以及调试过程](LeNet-5实际应用中报错以及调试过程.md)

[3.144 使用自定义数据集运行模型，报错TypeError: The predict type and infer type is not match, predict type is Tuple](使用自定义数据集运行模型-报错TypeError-The-predict-type-and-infer-type-is-not-match-predict-type-is-Tuple.md)

[3.145 MindSpore Dump功能使用经验](MindSpore-Dump功能使用经验-5.md)

[3.146 MindSpore 图算融合 GPU调试](MindSpore-图算融合-GPU调试.md)

[3.147 MindSpore 静态图网络编译使用HyperMap优化编译性能](MindSpore-静态图网络编译使用HyperMap优化编译性能.md)

[3.148 MindSpore 静态图网络编译使用Select算子优化编译性能](MindSpore-静态图网络编译使用Select算子优化编译性能.md)

[3.149 MindSpore 静态图网络编译使用编译缓存或者vmap优化性能](MindSpore-静态图网络编译使用编译缓存或者vmap优化性能.md)

[3.150 MindSpore模型权重功能无法保存更新后的权重](MindSpore模型权重功能无法保存更新后的权重.md)

[3.151 模型微调报错RuntimeError: Preprocess failed before run graph 1.](模型微调报错RuntimeError-Preprocess-failed-before-run-graph-1.md)

[3.152 Mindspore训练plog中算子GatherV2\_xxx\_high\_precision\_xx报错](Mindspore训练plog中算子GatherV2_xxx_high_precision_xx报错.md)

[3.153 使用Profiler\(\)函数，报错RuntimeError: The output path of profiler only supports alphabets\(a-zA-Z\)](使用Profiler()函数-报错RuntimeError-The-output-path-of-profiler-only-supports-alphabets(a-zA-Z).md)

[3.154 使用dataset.create\_dict\_iterator\(\)后，计算前向网络报错：untimeError: Illegal AnfNode for evaluating, node: @Batch](使用dataset-create_dict_iterator()后-计算前向网络报错-untimeError-Illegal-AnfNode-for-evaluating-node-Batch.md)

[3.155 使用MindSpore静态图速度慢的问题](使用MindSpore静态图速度慢的问题.md)

[3.156 MindSpore报错refer to Ascend Error Message](MindSpore报错refer-to-Ascend-Error-Message.md)

[3.157 Ascend上构建MindSpore报has no member named 'update output desc dpse' ;did you mean 'update\_output\_desc\_dq'?](Ascend上构建MindSpore报has-no-member-named-update-output-desc-dpse-did-you-mean-update_output_desc_dq.md)

[3.158 用ADGEN数据集评估时报错not support in PyNative RunOp!](用ADGEN数据集评估时报错not-support-in-PyNative-RunOp.md)

[3.159 使用mint.arctan2在图模式下报错RuntimeError: Compile graph kernel\_graph0 failed.](使用mint-arctan2在图模式下报错RuntimeError-Compile-graph-kernel_graph0-failed.md)

[3.160 模型训练时报错RuntimeError: aclnnFlashAttentionScoreGetWorkspaceSize call failed, please check!](模型训练时报错RuntimeError-aclnnFlashAttentionScoreGetWorkspaceSize-call-failed-please-check.md)

[3.161 运行MindCV案例报错Malloc for kernel input failed, Memory isn't enough, node:Default/ReduceMean-op0](运行MindCV案例报错Malloc-for-kernel-input-failed-Memory-isn-t-enough-node-Default-ReduceMean-op0.md)

[3.162 使用mindspore.ops.Bernoulli在昇腾设备上训练报错RuntimeError: Sync stream failed:Ascend\_0](使用mindspore-ops-Bernoulli在昇腾设备上训练报错RuntimeError-Sync-stream-failed-Ascend_0.md)

[3.163 使用mint.arctan2在图模式下报错RuntimeError: Compile graph kernel\_graph0 failed.](使用mint-arctan2在图模式下报错RuntimeError-Compile-graph-kernel_graph0-failed-6.md)

[3.164 MindCV训练报错ValueError: For 'context.set\_context', the keyword argument jit\_config is notrecognized!](MindCV训练报错ValueError-For-context-set_context-the-keyword-argument-jit_config-is-notrecognized.md)

[3.165 GRAPH\_MODE下运行ms\_tensor = mint.ones\_like\(input\_tensor, dtype=dtype\)报错The pointer\[device\_address\] is null.](GRAPH_MODE下运行ms_tensor-mint-ones_like(input_tensor-dtype-dtype)报错The-pointer-device_address-is-null.md)

[3.166 使用mint.index\_select 在图模式下求梯度报错AssertionError](使用mint-index_select-在图模式下求梯度报错AssertionError.md)

[3.167 使用mindspore.mint.where\(\)报错The supported input and output data types for the current operator are: node is Default/Bitwis](使用mindspore-mint-where()报错The-supported-input-and-output-data-types-for-the-current-operator-are-nod.md)

[3.168 使用mindspore.mint.gather函数计算出的结果错误](使用mindspore-mint-gather函数计算出的结果错误.md)

[3.169 使用Modelarts训练yolov5出现报错TypeError: modelarts\_pre\_process\(\) missing 1 required positional argument:’args’](使用Modelarts训练yolov5出现报错TypeError-modelarts_pre_process()-missing-1-required-positional-argument-args.md)

[3.170 使用mint.masked\_select在图模式下报错Parse Lambda Function Fail. Node type must be Lambda, but got Call.](使用mint-masked_select在图模式下报错Parse-Lambda-Function-Fail-Node-type-must-be-Lambda-but-got-Call.md)

[3.171 导入TextClassifier接口报错ModuleNotFoundError: No module named ‘mindnlp.models’](导入TextClassifier接口报错ModuleNotFoundError-No-module-named-mindnlp-models.md)

[3.172 模型调用Pad接口填充报错For ‘Pad’, output buffer memset failed.](模型调用Pad接口填充报错For-Pad-output-buffer-memset-failed.md)

[3.173 模型初始化和加载时间过长解决](模型初始化和加载时间过长解决.md)

[3.174 静态式下报错TypeError: pynative模式不支持重新计算](静态式下报错TypeError-pynative模式不支持重新计算.md)

**分类三：分布式并行报错案例**

[4.1 MindSpoer报错：The strategy is \(\(6, 4\), \(4,6\)\), the value of stategy must be the power of 2, but get 7.](报错ERROR-the-value-of-strategy-must-be-the-power-of-2-but-get-xx.md)

[4.2 MindSpore并行模式配置报错解决：Parallel mode dose not support \*\*](并行模式配置报错-Parallel-mode-dose-not-support-semi_parallel.md)

[4.3 Ascend多卡训练报错davinci\_model : load task fail, return ret xxx](Ascend多卡训练报错davinci_model-load-task-fail-return-ret-xxx.md)

[4.4 docker下运行分布式代码报nccl错误：connect returned Connection timed out，成功解决](docker下运行分布式代码报nccl错误-connect-returned-Connection-timed-out-成功解决.md)

[4.5 MindSpore报错Please try to reduce 'batch\_size' or check whether exists extra large shape.](MindSpore报错Please-try-to-reduce-batch_size-or-check-whether-exists-extra-large-shape.md)

[4.6 MindSpore报错：wq.weight in the argument 'net' should have the same shape as wq.weight in the argument 'parameter\_dict'.](MindSpore报错-wq-weight-in-the-argument-net-should-have-the-same-shape-as-wq-weight-in-the-argument-pa.md)

[4.7 多机训练报错：import torch\_npu.\_C ImportError: libascend\_hal.so: cannot open shared object file: No such file or directory](多机训练报错-import-torch_npu-_C-ImportError-libascend_hal-so-cannot-open-shared-object-file-No-such-file.md)

[4.8 MindSpore微调qwen1.5 报错AllocDeviceMemByEagerFree failed, alloc size](MindSpore微调qwen1-5-报错AllocDeviceMemByEagerFree-failed-alloc-size.md)

[4.9 使用MindSpore的get\_auto\_parallel\_context\("device\_num"\)识别设备信息错误](使用MindSpore的get_auto_parallel_context(-device_num-)识别设备信息错误.md)

[4.10 docker执行报错：RuntimeError: Maybe you are trying to call 'mindspore.communication.init\(\)' without using 'mpirun'](docker执行报错-RuntimeError-Maybe-you-are-trying-to-call-mindspore-communication-init()-without-using-mp.md)

[4.11 将torch架构的模型迁移到mindspore架构中时精度不一致](Ascend环境运行mindspore脚本报-网络脚本的设备被占用-只支持每张卡运行一个网络脚本.md)

**分类四：模型精度调优案例**

[5.1 Mindspore网络精度自动比对功能中protobuf问题分析](Mindspore网络精度自动比对功能中protobuf问题分析.md)

[5.2 使用mindpsore.nn.conv3d在GPU上精度不足](使用mindpsore-nn-conv3d在GPU上精度不足.md)

[5.3 使用model仓库的YOLOV5训练没有混合精度配置](使用model仓库的YOLOV5训练没有混合精度配置.md)

[5.4 将torch架构的模型迁移到mindspore架构中时精度不一致](将torch架构的模型迁移到mindspore架构中时精度不一致.md)

**分类五：模型性能调优案例**

[6.1 mindspore-Dump功能调试](mindspore-Dump功能调试.md)

[6.2 PyNative 调试体验](PyNative-调试体验.md)

[6.3 mindspore之中间文件保存](mindspore之中间文件保存.md)

[6.4 随机数生成函数导致模型速度越来越慢](随机数生成函数导致模型速度越来越慢.md)

**分类六：模型推理报错案例**

[7.1 训练过程中推理精度不变问题定位思路](训练过程中推理精度不变问题定位思路.md)

[7.2 MindSpore网络推理时使用Matmul矩阵乘法算子计算速度较慢](MindSpore网络推理时使用Matmul矩阵乘法算子计算速度较慢.md)

[7.3 mindspore推理报错NameError:The name 'LTM' is not defined, or not supported in graph mode.](mindspore推理报错NameError-The-name-LTM-is-not-defined-or-not-supported-in-graph-mode.md)

[7.4 MindSpore推理报错：Load op info form json config failed, version: Ascend310](MindSpore推理报错-Load-op-info-form-json-config-failed-version-Ascend310.md)

[7.5 使用converter\_lite转换包含Dropout算子的模型至MindSpore模型失败](使用converter_lite转换包含Dropout算子的模型至MindSpore模型失败.md)

[7.6 使用mindsporelite推理，出现data size not equal 错误，tensor size 0](使用mindsporelite推理-出现data-size-not-equal-错误-tensor-size-0.md)

[7.7 mindyolo在ckpt模型转为ONNX模型时报错](mindyolo在ckpt模型转为ONNX模型时报错.md)

[7.8 MindSpore Lite推理报错RuntimeError: data size not equal! Numpy size: 6144000, Tensor size: 0](MindSpore-Lite推理报错RuntimeError-data-size-not-equal-Numpy-size-6144000-Tensor-size-0.md)

[7.9 使用MindSpore Lite端侧模型转换工具将YOLOv8.onnx转为.ms报错Convert failed. Ret: Common error code.](使用MindSpore-Lite端侧模型转换工具将YOLOv8-onnx转为-ms报错Convert-failed-Ret-Common-error-code.md)

[7.10 模型推理报错ValueError: For BatchMatMul, inputs shape cannot be broadcast on CPU/GPU.](模型推理报错ValueError-For-BatchMatMul-inputs-shape-cannot-be-broadcast-on-CPU-GPU.md)

[7.11 MindSpore Lite调用macBert模型报错](MindSpore-Lite调用macBert模型报错.md)

[7.12 MindSpore Lite模型加载报错RuntimeError: build from file failed! Error is Common error code.](MindSpore-Lite模型加载报错RuntimeError-build-from-file-failed-Error-is-Common-error-code.md)

[7.13 使用.om格式模型结合gradio框架进行推理出现模型执行错误](使用-om格式模型结合gradio框架进行推理出现模型执行错误.md)

[7.14 qwen1.5-0.5b推理报错Launch kernel failed, kernel full name: Default/ScatterNdUpdate-op0](qwen1-5-0-5b推理报错Launch-kernel-failed-kernel-full-name-Default-ScatterNdUpdate-op0.md)

[7.15 mindformers推理qwen2.5-72b报显存不足及解决](mindformers推理qwen2-5-72b报显存不足及解决.md)

[7.16 使用MindSpore将.ckpt转.air再转.om出现AttributeError: 'AclLiteModel' object has no attribute '\_is\_destroye](使用MindSpore将-ckpt转-air再转-om出现AttributeError-AclLiteModel-object-has-no-attribute-_is_destroye.md)

**分类七：模型迁移报错案例**

[8.1 MindSpore报错ValueError: For 'Mul', x.shape and y.shape are supposed to broadcast](报错ValueError-For-Mul-x-shape-and-y-shape-are-supposed-to-broadcast-where-broadcast-means-that-x.md)

[8.2 MindSpore报错：The sub operat ion does not support the type kMetaTypeNone, Tensor Float33.](报错RuntimeError-The-sub-operation-does-not-support-the-type-kMetaTypeNone-Tensor-Float32.md)

[8.3 迁移pytorch代码时如何将torch.device映射 usability/api](迁移pytorch代码时如何将torch-device映射-usability-api.md)

[8.4 迁移网络tacotron2时遇到backbone中的FPN架构没有nn.ModuleDict](迁移网络tacotron2时遇到backbone中的FPN架构没有nn-ModuleDict.md)

[8.5 迁移网络tacotron2时遇到mindspore没有对应torch的tensor.clone接口](迁移网络tacotron2时遇到mindspore没有对应torch的tensor-clone接口.md)

[8.6 迁移网络tacotron2时遇到mindspore中缺少MultiScaleRoiAlign算子](迁移网络tacotron2时遇到mindspore中缺少MultiScaleRoiAlign算子.md)

[8.7 迁移网络tacotron2时遇到torch.max、torch.min可以传入2个tensor，但是ops.max不可以](迁移网络tacotron2时遇到torch-max-torch-min可以传入2个tensor-但是ops-max不可以.md)

[8.8 迁移网络tacotron2时遇到mindsporeAPI binary\_cross\_entropy\_with\_logits描述有问题](迁移网络tacotron2时遇到mindsporeAPI-binary_cross_entropy_with_logits描述有问题.md)

[8.9 迁移网络tacotron2时遇到grad\_fn反向求导报错](迁移网络tacotron2时遇到grad_fn反向求导报错.md)

[8.10 迁移网络tacotron2时遇到RuntimeError: The pointer\[top\_cell\_\] is null.](迁移网络tacotron2时遇到RuntimeError-The-pointer-top_cell_-is-null.md)

[8.11 迁移网络tacotron2时遇到Loss损失过高问题](迁移网络tacotron2时遇到Loss损失过高问题.md)

[8.12 迁移网络tacotron2时mindspore的权重初始化与torch的不一致](迁移网络tacotron2时mindspore的权重初始化与torch的不一致.md)

[8.13 迁移网络tacotron2时遇到mindspore中没有Tensor.detach\(\)方法及解决](迁移网络tacotron2时遇到mindspore中没有Tensor-detach()方法及解决.md)

[8.14 迁移tacotron2网络到MindSpore时遇到torch.Tensor.new\_full\(\)接口缺失](迁移tacotron2网络到MindSpore时遇到torch-Tensor-new_full()接口缺失.md)

[8.15 迁移tacotron2网络到MindSpore时遇到torch.tensor.copy\_函数缺失](迁移tacotron2网络到MindSpore时遇到torch-tensor-copy_函数缺失.md)

[8.16 迁移tacotron2网络到MindSpore时ops.flip\(image, -1\)水平翻转图片出现报错](迁移tacotron2网络到MindSpore时ops-flip(image--1)水平翻转图片出现报错.md)

[8.17 MindSpore实现多输出模型的loss用LossBase类实现](MindSpore实现多输出模型的loss用LossBase类实现.md)

[8.18 迁移网络时转化为静态图的时候报错](迁移网络时转化为静态图的时候报错.md)

[8.19 MindSpore实现Swin Transformer时遇到tensor和numpy均不能采用.format经行格式化输出](MindSpore实现Swin-Transformer时遇到tensor和numpy均不能采用-format经行格式化输出.md)

[8.20 MindSpore实现Swin Transformer时遇到ms.common.initializer.Constant\(0.0\)\(m.bias\)不起初始化改变数值的作用](MindSpore实现Swin-Transformer时遇到ms-common-initializer-Constant(0-0)(m-bias)不起初始化改变数值的作用.md)

[8.21 使用MindSpore替换torch.distributions的Categorical函数](使用MindSpore替换torch-distributions的Categorical函数.md)

[8.22 MindSpore报错AttributeError: 'Parameter' object has no attribute 'uniform\_'](MindSpore报错AttributeError-Parameter-object-has-no-attribute-uniform_.md)

[8.23 MindSpore报错AttributeError: The 'Controller' object has no attribute 'to'.](MindSpore报错AttributeError-The-Controller-object-has-no-attribute-to.md)

[8.24 如何使用MindSpore实现Torch的logsumexp函数](如何使用MindSpore实现Torch的logsumexp函数.md)

[8.25 使用MindSpore Cell的construct报错AttributeError: For 'Cell', the method 'construct' is not defined.](使用MindSpore-Cell的construct报错AttributeError-For-Cell-the-method-construct-is-not-defined.md)

[8.26 使用MindSpore替换PyTorch的torch.nn.init](使用MindSpore替换PyTorch的torch-nn-init.md)

[8.27 使用MindSpore报错AttributeError: 'Parameter' object has no attribute 'uniform\_'](使用MindSpore报错AttributeError-Parameter-object-has-no-attribute-uniform_.md)

[8.28 使用MindSpore实现pytorch中的前反向传播](使用MindSpore实现pytorch中的前反向传播.md)

[8.29 MindSpore如何实现pytoch中的detach\(\)方法](MindSpore如何实现pytoch中的detach()方法.md)

[8.30 MindSpore报错TypeError: init\(\) missing 2 required positional arguments: 'vocab\_size' and 'embedding\_size'](MindSpore报错TypeError-init()-missing-2-required-positional-arguments-vocab_size-and-embedding_size.md)

[8.31 使用Mindspore的embedding报错](使用Mindspore的embedding报错.md)

[8.32 使用MindSpore报错TypeError:Invalid dtype](使用MindSpore报错TypeError-Invalid-dtype.md)

[8.33 MindSpore3.3设置了int64后，算子里不会默认更改了](MindSpore2-3设置了int64后-算子里不会默认更改了.md)

[8.34 运行wizardcoder迁移代码报错broken pipe](运行wizardcoder迁移代码报错broken-pipe.md)

**有任何疑问欢迎访问昇思MindSpore官网和论坛：**

**[昇思MindSpore官网](https://www.mindspore.cn/)地址：[https://www.mindspore.cn/](https://www.mindspore.cn/)**

**[昇思MindSpore论坛](https://bbs.huaweicloud.com/forum/forum-1076-1.html)地址：[https://www.hiascend.com/forum/forum-0106101385921175002-1.html](https://www.hiascend.com/forum/forum-0106101385921175002-1.html)**

