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

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,即可顺利训练

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐