在训练模型时,系统报错,出现如下情况:
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.
然而检查数据集、环境配置参数发现没有问题,相同的模型、配置和训练数据集在其他电脑上可以正常训练。文章来源:https://www.toymoban.com/news/detail-532394.html
解决方案:更换了numpy版本和Python版本,从原来的python3.10和numpy1.24.3替换为python3.9 与numpy1.22.3,即可顺利训练文章来源地址https://www.toymoban.com/news/detail-532394.html
到了这里,关于解决python-报错----ValueError: setting an array element with a sequence.的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!