【MindSpore报错解决地图】常见报错问题和解决方案(持续更新)

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

1、数据处理报错案例

1.1 MindSpore数据集加载-调试小工具 py-spy
1.2 【MindData】如何将自有数据高效的生成MindRecord格式数据集,并且防止爆内存
1.3 【MindSpore Dataset】在使用Dataset处理数据过程中内存占用高,怎么优化?
1.4 如何处理数据集加载多进程错误
1.5 MindRecord-Windows下中文路径问题Unexpected error. Failed to open file
1.6 MindRecord数据集格式-Windows下数据集报错Invalid file, DB file can not match
1.7 MindSpore数据集加载-GeneratorDataset卡住、卡死
1.8 MindSpore-GeneratorDataset报错误Unexpected error. Invalid data type.
1.9 MindSpore数据集加载-GeneratorDataset数据处理报错:The pointer cnode is null
1.10 MindSpore数据集报错【The data pipeline is not a tree】
1.11 MindSpore数据增强报错:Use Decode for encoded data or ToPILfor decoded data.
1.12 MindSpore自定义数据增强报错【args should be Numpy narray.Got <class ‘tuple’>】
1.13 MindSpore数据集加载-GeneratorDataset功能及常见问题
1.14 MindSpore数据加载报错【too many open files】
1.15 MindSpore数据增强报错【TypeError: Invalid with type】
1.16 MindSpore数据集格式报错【MindRecord File could not open successfully】
1.17 MindSpore数据集加载报错【‘IdentitySampler’ object has no attribute ‘child_sampler’】
1.18 MindSpore数据集加载baoc【‘DictIterator’ has no attribute ‘get_next’】
1.19 MindSpore数据集加载报错【IndexError: list index out of range】
1.20 MindSpore数据增强后,内存不足,自动退出
1.21 MindSpore报错RuntimeError: Syntax error. Invalid data, Page size: 1048576 is too small to save a blob row.
1.22 MindSpore报错TypeError: parse missing 1 required positional argument:‘self’
1.23 MindSpore报错RuntimeError: Exception thrown from PyFunc.
1.24 MindSpore报错RuntimeError: Thread ID 140706176251712 Unexpected error.
1.25 MindSpore报错RuntimeError:the size of column_names is:1 and number of returned NumPy array is:2
1.26 MindSpore报错RuntimeError:Invalid data, the number of schema should be positive but got: 0. Please check the input schema.
1.27 图像类型错误导致执行报错:TypeError: img should be PIL image or NumPy array. Got <class ‘list’>.
1.28 通道顺序错误引起matplotlib.image.imsave执行报错:raise ValueError"Third dimension must be 3 or 4"
1.29 cv2.imwrite保存Tensor引起类型报错:cv2.error: OpenCV : -1: error: in function ‘imwrite’
1.30 cv2保存图片类型错误执行报错,由于没有将tensor转换为numpy,导致cv2.imwrite运行失败
1.31 MindSpore报错RuntimeError: Invalid data, the number of schema should be positive but got: 0. Please checkthe input schema.
1.32 MindSpore报错MRMOpenError: MindRecord File could not open successfully.
1.33 MindSpore报错RuntimeError: Invalid python function, the ‘source’ of ‘GeneratorDataset’ should return same number …
1.34 MindSpore报错ValueError: when loss_fn is not None, train_dataset should return two elements, but got 3
1.35 MindSpore数据类型转换结果不符合预期
1.36 MindSpore报错TypeError:parse missing 1 required positional argument: ‘self’
1.37 使用mindspore.ops.interpolate报错ValueError:For “scale_factor” option cannot currentiy be set with the mode = bilinear = 4D
1.38 mindspore.dataset.Dataset.split切分数据集时randomize=True时分割出的数据不够随机问题
1.39 MindSpore拆分dataset输入给多输入模型
1.40 使用ImageFolderDataset读取图片在进行PIL转化的时候出现报错
1.41 MindSpore如何对使用了自定义采样器的数据集进行分布式采样
1.42 ImageFolderDataset读取图片在进行PIL转化的时候出现报错
1.43 使用MindSpore读取数据报错RuntimeError:Exception thrown from dataset pipeline. Refer to ‘Dataset Pipline Error Message’.
1.44 使用MindSpore对vision.SlicePatches的数据集切分和合并
1.45 MindSpore对vision.SlicePatches的数据集切分
1.46 MindSpore调用Dataset.batch中per_batch_map函数出错
1.47 报错:mindspore._c_expression.typing.TensorType object is not callable
1.48 Ascend print数据落盘使用
1.49 MindSpore在construct中进行标量计算
1.50 MindSpore报错:module ‘mindspore.dataset.vision’ has no attribute ‘Normalize’
1.51 使用Dataset处理数据过程中如何优化内存占用高的问题

2、模型构建与训练报错案例

2.1 MindSpore报错“RuntimeError: Exceed function call depth limit 1000”
2.2 MindSpore报错:AttributeError:Tensor has no attribute
2.3 MindSpore报错AttributeError:NoneType has no attribute…
2.4 Mindspore 报错:the dimension of logits must be equal to 2, but got 3
2.5 MindSpore报错ValueError: For ‘Pad’, all elements of paddings must be gt;= 0.
2.6 MindSpore报错ValueError:For xx,the x shape:xx must be equal to xxx
2.7 MindSpore报类型错误TypeError: For ‘Tensor’, the type of input_data should be one of ‘[‘Tensor’, ‘ndarray’,]’
2.8 MindSpore报错 ScatterNdUpdate这个算子在Ascend硬件上不支持input0是int32的数据类型
2.9 MindSpore报错TypeError: ScalarAdd不支持bool类型
2.10 MindSpore报RuntimeError:ReduceSum算子不支持8维及以上的输入而报错
2.11 MindSpore报错:Unsupported parameter type for python primitive, the parameter value is KeywordArg key : axis, value:
2.12 MindSpore报错RuntimeError:Primitive ScatterAddapos;s bprop not defined
2.13 MindSpore报运行时错误: x shape的C_in除以group应等于weight的C_in
2.14 昇思报错“input_x”形状的乘积应等于“input_shape”的乘积,但“input_x”形状的积为65209,“input_sshape”的积为65308
2.15 MindSpore报错ValueError:x.shape和y.shape不能广播,得到i:-2,x.shapes:[2,5],y.shape:[3,5]
2.16 MindSpore报错ValueError: For ‘MatMul’, the input dimensions must be equal, but got ‘x1_col’: 12800 and ‘x2_row’: 10
2.17 MindSpore报错:无法在AI CORE或AI CPU内核信息候选列表中为Default/Pow-op0选择有效的内核信息
2.18 MindSpore报错ValueError: `x rank` in `NLLLoss` should be int and must in [1, 2], but got `4` with type `int
2.19 MindSpore报错Select GPU kernel op BatchNorm fail! Incompatible data type!
2.20 MindSpore报错ValueError: For ‘MirrorPad’, paddings must be a Tensor with type of int64, but got None.
2.21 MindSpore报错 For primitive TensorSummary, the v rank 必须大于等于0
2.22 MindSpore报错TypeError: For ‘CellList’, each cell should be subclass of Cell, but got NoneType.
2.23 MindSpore报错RuntimeError: Call runtime rtStreamSynchronize failed. Op name: Default/CTCGreedyDecoder-op2
2.24 MindSpore报错ValueError:padding_idx in Embedding超出范围的报错
2.25 MindSpore报错ValueError: seed2 in StandardNormal should be int and must >= 0, but got -3 with type int.
2.26 MindSpore报错 Ascend 环境下ReduceMean不支持8维及其以上的输入
2.27 MindSpore报错: Conv2D第三维输出数据类型必须是正整数或者SHP_ANY, but got -59
2.28 MindSpore报错TypeError: 对于TopK的输入类型必须是int32, float16或者float32, 而实际得到的是float64.
2.29 MindSpore报错 ValueError:Minimum inputs size 0 does not match the requires signature size 2
2.30 MindSpore报错ValueError: Currently half_pixel_centers=True only support in Ascend device_target, but got CPU
2.31 MindSpore报错ValueError:输出形状的每一个值都应该大于零, 实际出现了负数
2.32 昇思报错"The function construct need xx positional argument …"怎么办
2.33 MindSpore报错算子AddN的输入类型和输出类型kNumberTypeBool不支持
2.34 MindSpore报错should be initialized as a ‘Parameter’ type in the ‘init’ function, but got ‘2.0’ with type 'float.
2.35 MindSpore报错RuntimeError: The ‘add’ operation does not support the type [kMetaTypeNone, Int64].
2.36 MindSpore报错:When eval ‘Tensor’ by using Fallback feature
2.37 MindSpore报错RuntimeError: Net parameters weight shape xxx i
2.38 GPU设备算力不足导致计算结果错误cublasGemmEx failed
2.39 GPU环境运行MindSpore报错:设卡失败 SetDevice failed
2.40 Ascend环境使用mindspore报Total stream number xxx exceeds the limit of 1024, secrch details information in mindspore’s FAQ.
2.41 LoadTask Distribute Task Failed 报错解决
2.42 GPU训练提示分配流失败cudaStreamCreate failed
2.43 如何处理GPU训练过程中出现内存申请大小为0的错误【The memory alloc size is 0】
2.44 MindSpore报错ValueError: Please input the correct checkpoint
2.45 加载checkpoint的时候报warning日志 quot;xxx parameters in the net are not
2.46 执行时遇到 For context.set_context, package type xxx support devic
2.47 MindSpore PyNative模式下The pointer top_cell_ is null错误
2.48 Ascend环境运行mindspore脚本报:网络脚本的设备被占用,当前MindSpore框架在Ascend环境只支持每张卡运行一个网络脚本
2.49 ms报错ValueError: Please input the correct checkpoint
2.50 MindSpore报错ValueError: For ‘MatMul’, the input dimensions must be equal, but got ‘x1_col’: 2 and ‘x2_row’: 1.
2.51 没有ckpt文件导致模型加载执行报错:ckpt does not exist, please check whether the ‘ckpt_file_name’ is correct.
2.52 Tensor张量shape不匹配导致执行报错:ValueError:x.shape和y.shape不能广播
2.53 自定义loss没有继承nn.Cell导致执行报错:ParseStatement Unsupported statement ‘Try’.
2.54 MindSpore:For ‘Optimizer’,the argument parameters must be Iterable type,but got<class’mindspore.common.tensor.Tensor’>.
2.55 形参与实参的不对应导致ops.GradOperation执行报错:The parameters number of the function is 2, but the number of provided arguments is 1.
2.56 return回来的参数承接问题导致执行报错:AttributeError: ‘tuple’ object has no attribute ‘asnumpy’
2.57 维度数错误引起模型输入错误:For primitive Conv2D, the x shape size must be equal to 4, but got 3.
2.58 MindSpore报错:The value parameter,it’s name ‘xxxx’ already exsts. please set a unique name for the parameter .
2.59 construct方法名称错误引起损失函数执行报错:The ‘sub’ operation does not support the type TensorFloat32, None.
2.60 MindSpore报错RuntimeError:The sub operation does not support the type TensorFloat32, None.
2.61 注释不当报错:There are incorrect indentations in definition or comment of function: ‘Net.construct’.
2.62 静态图执行卡死问题:For MakeTuple, the inputs should not be empty..node:xxx
2.63 MindSpore报错: module takes at most 2 arguments
2.64 For ScatterNdAdd, the 3-th value of indices7 is out of range4scatterNdAdd算子报错解决
2.65 使用ops.nonzero算子报错TypeError: Type Join Failed: dtype1 = Float32, dtype2 = Int64.
2.66 调用MindSpore内部函数时的语法错误TypeError: module object is not callable
2.67 MindSpore在静态图模式下使用try语法报错RuntimeError: Unsupported statement Try.
2.68 报错: ValueError: For ‘MatMul’, the input dimensions must be equal, but got ‘x1_col’: 817920 and ‘x2_row’: 272640.
2.69 MindSpore 报错提示 DropoutGrad 的bprop反向未定义:quot;Illegal primitive: Primitive DropoutGrad’s bprop not defined.quot;
2.70 MindSpore报错The graph generated form MindIR is not support to execute in the PynativeMode,please convert to the GraphMode
2.71 MindSpore报错RuntimeError: For ’Optimizer’, the argument group params must not be empty.
2.72 使用mindspore.ops.MaxPool3D算子设置为ceil_mode=True时,在MindSpore1.8.1和1.9.0版本中计算结果不一致
2.73 Construct内报错和定位解决
2.74 gather算子报错:TypeError以及定位解决
2.75 报错:module takes at most 2 arguments
2.76 注释不当报错:There are incorrect indentations in definition or comment of function: ‘Net.construct’.
2.77 MindSpore报错untimeError: Exceed function call depth limit 1000.
2.78 MindSpore图编译报错TypeError: ‘int’ object is not iterable.
2.79 MindSpore报错RuntimeError: The ‘getitem’ operation does not support the type [Func, Int64].
2.80 MindSpore cpu版本源码编译失败
2.81 MindSpore图编译报错TypeError: ‘int’ object is not iterable.
2.82 MindSpore的Cell.insert_child_to_cell 添加层会出现参数名重复
2.83 mindspore.numpy.unique 不支持 0 shape tensor
2.84 MindSpore直接将Tensor从布尔值转换为浮点数导致错误Error: IndexError: index 1 is out of bounds for dimension with size 1
2.85 MindSpore中的mindspore.numpy.bincount 大数值情况下报ValueError定位与解决
2.86 使用mindspore.numpy.broadcast_to 算子报错及解决
2.87 使用MindSpore中的SoftMax算子计算单一数据出错Run op inputs type is invalid!
2.88 CSRTensor 矩阵乘法计算出错RuntimeError:CUDA Error: cudaMemcpy failed.|Error Number: 700 an illegal memory access was encountered
2.89 Cell对象序列化失败-使用pickle.dumps保存到本地后重新加载失败
2.90 TopK算子返回的全零的Tensor的解决
2.91 在NPU上的切片操作x=x[:,::-1,:,:]不生效的分析解决
2.92 张量运算失败报错RuntimeError:Malloc for kernel output failed, Memory isn’t enough
2.93 MindSpore Dump功能使用经验
2.94 使用SymbolTree.get_network处理conv2d算子时报错NameError:name “Cell” is not defined
2.95 使用mindspore中Conv2dTranspose的outputpadding时,设置has_bias=True时失效
2.96 使用mindspore.ops.pad算子报错位置有误
2.97 使用mindspore.numpy.sqrt 计算结果不正确
2.98 函数变换获得梯度计算函数时报错AttributeError: module ‘mindspore’ has no attribute ‘value_and_grad’
2.99 自定义ops.Custom报错TypeError: function output_tensor expects two inputs, but get 1
2.100 报错ValueError: Input buffer_size is not within the required interval of [2, 2147483647].
2.101 使用MindSpore的LayerNorm报错ValueError: For ‘LayerNorm’, gamma or beta shape must match input shape.
2.102 使用nn.pad报错RuntimeError:For ‘Pad’, output buffer memset failed
2.103 使用shard接口遇到空指针的报错RuntineError: The pointer [comm_lib_instance_] is null.
2.104 AttributeError: Tensor[Int64] object has no attribute: asnumpy
2.105 使用计算得到的Tensor进行slicing赋值时报错RuntimeError: The int64_t value is less than 0.
2.106 总loss由多个loss组成时的组合
2.107 使用classmindspore_rl.policy.EpsilonGreedyPolicy发现维度不匹配及解决
2.108 自定义Callback重载函数调用顺序错误及解决
2.109 MindSpore报错:all types should be same, but got mindspore.tensor[float64], mindspore.tensorfloat32
2.110 MindSpore在GRAPH_MODE下初始化,报错提示当前的执行模式是禁用了任务下沉(TASK_SINK)
2.111 使用vision.ToPIL在一定情况下无效
2.112 MindSpore不能像torch的param.grad直接获取梯度问题
2.113 MindSpore跑resnet50报错For ‘MatMul’ the input dimensions must be equal, but got ‘x1_col’: 32768 and ‘x2_row’: 2048
2.114 使用piecewise_constant_lr造成梯度异常
2.115 MindSpore报错AttributeError: module ‘mindspore.ops’ has no attribute ‘mm’
2.116 MindSpore报错’Resize’ from mindspore.dataset.vision.c_transforms is deprecated
2.117 MindSpore中的text_format.Merge和text_format.Parse的区别
2.118 MindSpore如何将add_node函数添加节点信息到self.node中
2.119 如何读取MindSpore中的.pb文件中的节点
2.120 MindSpore报错Please try to reduce ‘batch_size’ or check whether exists extra large shape.及解决
2.121 MindSpore报错RuntimeError: Load op info form json config failed, version: Ascend310
2.122 MindSpore跑resnet50报错For ‘MatMul’ the input dimensions must be equal, but got ‘x1_col’: 32768 and ‘x2_row’: 2048
2.123 使用MindSpore的ops中的矩阵相乘算子进行int8的相乘运算时报错
2.124 使用Mindspore模型训练时出现梯度为0现象
2.125 MindSpore开启summary报错ValueError: not enough values to unpack
2.126 使用MindSpore实现梯度对数据求导retain_graph=True
2.127 使用SummaryRecord记录计算图报错:Failed to get proto for graph.
2.128 使用MindSpore的initializer生成的Tensor行为不符合预期
2.129 MindSpore的VIT报错[OneHot] failed. OneHot: index values should not bigger than num classes: 100, but got: 100.
2.130 MindSpore使用run_pyscf跑量子化学时报错Invalid cross-device link
2.131 算子编译过程中报错A module that was compiled using NumPy 1.x cannot be run in Numpy 2.0.0 .
2.132 MindSpore神经网络训练中的梯度消失问题
2.133 MindSpore报错:The supported input and output data types for the current operator are: node is Default/BitwiseAnd
2.134 MindSpore模型加载报错RuntimeError: build from file failed! Error is Common error code.
2.135 MindSpore模型转换报错RuntimeError: Can not find key SiLU in convert nap. Exporting SiLU operator is not yet supported.
2.136 MindSpore报错Kernel launch failed, msg: Acl compile and execute failed, op_type_:AvgPool3D
2.137 MindSpore报错“ValueError: For ‘MatMul’, the input dimensions必须相等
2.138 类型报错: 编译报错,编译时报错 “Shape Join Failed”
2.139 Asttokens版本稳定性性的问题
2.140 MindSpore报错ValueError: x rank in NLLLoss should be int and must in [1, 2], but got 4 with type int
2.141 MindSpore PyNative模式下The pointer[top_cell_] is null错误
2.142 MindSpore报错ERROR:PyNative Only support STAND_ALONE,DATA_PARALLEL and AUTO_PARALLEL under shard function for ParallelMode
2.143 LeNet-5实际应用中报错以及调试过程
2.144 使用自定义数据集运行模型,报错TypeError: The predict type and infer type is not match, predict type is Tuple
2.145 MindSpore Dump功能使用经验
2.146 MindSpore图算融合 GPU调试
2.147 MindSpore静态图网络编译使用HyperMap优化编译性能
2.148 MindSpore静态图网络编译使用Select算子优化编译性能
2.149 MindSpore静态图网络编译使用编译缓存或者vmap优化性能
2.150 MindSpore模型权重功能无法保存更新后的权重
2.151 模型微调报错RuntimeError: Preprocess failed before run graph 1.
2.152 Mindspore训练plog中算子GatherV2_xxx_high_precision_xx报错
2.153 使用Profiler函数,报错RuntimeError: The output path of profiler only supports alphabets
2.154 使用dataset.create_dict_iterator后,计算前向网络报错:untimeError: Illegal AnfNode for evaluating, node: @Batch
2.155 使用MindSpore静态图速度慢的问题
2.156 MindSpore报错refer to Ascend Error Message
2.157 Ascend上构建MindSpore报has no member named ‘update output desc dpse’ ;did you mean ‘update_output_desc_dq’?
2.158 用ADGEN数据集评估时报错not support in PyNative RunOp!
2.159 使用mint.arctan2在图模式下报错RuntimeError: Compile graph kernel_graph0 failed.
2.160 模型训练时报错RuntimeError: aclnnFlashAttentionScoreGetWorkspaceSize call failed, please check!
2.161 运行MindCV案例报错Malloc for kernel input failed, Memory isn’t enough, node:Default/ReduceMean-op0
2.162 使用mindspore.ops.Bernoulli在昇腾设备上训练报错RuntimeError: Sync stream failed:Ascend_0
2.163 使用mint.arctan2在图模式下报错RuntimeError: Compile graph kernel_graph0 failed.
2.164 MindCV训练报错ValueError: For ‘context.set_context’, the keyword argument jit_config is notrecognized!
2.165 GRAPH_MODE下运行ms_tensor = mint.ones_like报错The pointer device_address() is null.
2.166 使用mint.index_select 在图模式下求梯度报错AssertionError
2.167 使用mindspore.mint.where报错The supported input and output data types for the current operator are: node is Default/Bitwis
2.168 使用mindspore.mint.gather函数计算出的结果错误
2.169 使用Modelarts训练yolov5出现报错TypeError: modelarts_pre_process missing 1 required positional argument:’args’
2.170 使用mint.masked_select在图模式下报错Parse Lambda Function Fail. Node type must be Lambda, but got Call.
2.171 导入TextClassifier接口报错ModuleNotFoundError: No module named ‘mindnlp.models’
2.172 模型调用Pad接口填充报错For ‘Pad’, output buffer memset failed.
2.173 模型初始化和加载时间过长解决
2.174 静态式下报错TypeError: pynative模式不支持重新计算

3、分布式并行报错案例

3.1 MindSpoer报错:The strategy is ((6, 4), (4,6)), the value of stategy must be the power of 2, but get 6.
3.2 MindSpore并行模式配置报错解决:Parallel mode dose not support **
3.3 Ascend多卡训练报错davinci_model : load task fail, return ret xxx
3.4 docker下运行分布式代码报nccl错误:connect returned Connection timed out,成功解决
3.5 MindSpore报错Please try to reduce ‘batch_size’ or check whether exists extra large shape.方法二
3.6 MindSpore报错:wq.weight in the argument ‘net’ should have the same shape as wq.weight in the argument ‘parameter_dict’.
3.7 多机训练报错:import torch_npu._C ImportError: libascend_hal.so: cannot open shared object file: No such file or directory
3.8 MindSpore微调qwen1.5 报错AllocDeviceMemByEagerFree failed, alloc size
3.9 使用MindSpore的get_auto_parallel_context识别设备信息错误
3.10 docker执行报错:RuntimeError: Maybe you are trying to call ‘mindspore.communication.init’ without using ‘mpirun’
3.11 Ascend环境运行mindspore脚本报:网络脚本的设备被占用,只支持每张卡运行一个网络脚本

4、模型精度调优案例

4.1 Mindspore网络精度自动比对功能中protobuf问题分析
4.2 使用mindpsore.nn.conv3d在GPU上精度不足
4.3 使用model仓库的YOLOV5训练没有混合精度配置
4.4 将torch架构的模型迁移到mindspore架构中时精度不一致

5、模型性能调优案例

5.1 mindspore-Dump功能调试
5.2 PyNative 调试体验
5.3 mindspore之中间文件保存
5.4 随机数生成函数导致模型速度越来越慢

6、模型推理报错案例

6.1 训练过程中推理精度不变问题定位思路
6.2 MindSpore网络推理时使用Matmul矩阵乘法算子计算速度较慢
6.3 mindspore推理报错NameError:The name ‘LTM’ is not defined, or not supported in graph mode.
6.4 MindSpore推理报错:Load op info form json config failed, version: Ascend310P3
6.5 使用converter_lite转换包含Dropout算子的模型至MindSpore模型失败
6.6 使用mindsporelite推理,出现data size not equal 错误,tensor size 0
6.7 mindyolo在ckpt模型转为ONNX模型时报错
6.8 MindSpore Lite推理报错RuntimeError: data size not equal! Numpy size: 6144000, Tensor size: 0
6.9 使用MindSpore Lite端侧模型转换工具将YOLOv8.onnx转为.ms报错Convert failed. Ret: Common error code.
6.10 模型推理报错ValueError: For BatchMatMul, inputs shape cannot be broadcast on CPU/GPU.
6.11 MindSpore Lite调用macBert模型报错
6.12 MindSpore Lite模型加载报错RuntimeError: build from file failed! Error is Common error code.
6.13 使用.om格式模型结合gradio框架进行推理出现模型执行错误
6.14 qwen1.5-0.5b推理报错Launch kernel failed, kernel full name: Default/ScatterNdUpdate-op0
6.15 mindformers推理qwen2.5-72b报显存不足及解决
6.16 使用MindSpore将.ckpt转.air再转.om出现AttributeError: ‘AclLiteModel’ object has no attribute '_is_destroye

7、模型迁移报错案例

7.1 MindSpore报错ValueError: For ‘Mul’, x.shape and y.shape are supposed to broadcast
7.2 MindSpore报错:The sub operat ion does not support the type kMetaTypeNone, Tensor Float32.
7.3 迁移pytorch代码时如何将torch.device映射 usability/api
7.4 迁移网络tacotron2时遇到backbone中的FPN架构没有nn.ModuleDict
7.5 迁移网络tacotron2时遇到mindspore没有对应torch的tensor.clone接口
7.6 迁移网络tacotron2时遇到mindspore中缺少MultiScaleRoiAlign算子
7.7 迁移网络tacotron2时遇到torch.max、torch.min可以传入2个tensor,但是ops.max不可以
7.8 迁移网络tacotron2时遇到mindsporeAPI binary_cross_entropy_with_logits描述有问题
7.9 迁移网络tacotron2时遇到grad_fn反向求导报错
7.10 迁移网络tacotron2时遇到RuntimeError: The pointer[top_cell_] is null.
7.11 迁移网络tacotron2时遇到Loss损失过高问题
7.12 迁移网络tacotron2时mindspore的权重初始化与torch的不一致
7.13 迁移网络tacotron2时遇到mindspore中没有Tensor.detach方法及解决
7.14 迁移tacotron2网络到MindSpore时遇到torch.Tensor.new_full接口缺失
7.15 迁移tacotron2网络到MindSpore时遇到torch.tensor.copy_函数缺失
7.16 迁移tacotron2网络到MindSpore时ops.flip水平翻转图片出现报错
7.17 MindSpore实现多输出模型的loss用LossBase类实现
7.18 迁移网络时转化为静态图的时候报错
7.19 MindSpore实现Swin Transformer时遇到tensor和numpy均不能采用.format经行格式化输出
7.20 MindSpore实现Swin Transformer时遇到ms.common.initializer.Constant不起初始化改变数值的作用
7.21 使用MindSpore替换torch.distributions的Categorical函数
7.22 MindSpore报错AttributeError: ‘Parameter’ object has no attribute ‘uniform_’
7.23 MindSpore报错AttributeError: The ‘Controller’ object has no attribute ‘to’.
7.24 如何使用MindSpore实现Torch的logsumexp函数
7.25 使用MindSpore Cell的construct报错AttributeError: For ‘Cell’, the method ‘construct’ is not defined.
7.26 使用MindSpore替换PyTorch的torch.nn.init
7.27 使用MindSpore报错AttributeError: ‘Parameter’ object has no attribute ‘uniform_’
7.28 使用MindSpore实现pytorch中的前反向传播
7.29 MindSpore如何实现pytoch中的detach方法
7.30 MindSpore报错TypeError: init missing 2 required positional arguments: ‘vocab_size’ and ‘embedding_size’
7.31 使用Mindspore的embedding报错
7.32 使用MindSpore报错TypeError:Invalid dtype
7.33 MindSpore2.3设置了int64后,算子里不会默认更改了
7.34 运行wizardcoder迁移代码报错broken pipe

离线版下载

  • 这里也贴心的为大家提供了三种离线版本的报错解决地图,欢迎下载哦!

· docx版本下载地址
· pdf版本下载地址
· md版本下载地址