解决python-报错—-ValueError: setting an array element with a sequence.

在训练模型时,系统报错,出现如下情况:

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (6,) + inhomogeneous part.

 然而检查数据集、环境配置参数发现没有问题,相同的模型、配置和训练数据集在其他电脑上可以正常训练。

解决方案:更换了numpy版本和Python版本,从原来的python3.10和numpy1.24.3替换为python3.9 与numpy1.22.3,即可顺利训练

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
青葱年少的头像青葱年少普通用户
上一篇 2023年7月6日
下一篇 2023年7月6日

相关推荐