在进行图像识别的时候也出现了这个问题
AttributeError: ‘_SingleProcessDataLoaderIter‘ object has no attribute ‘next‘
inputs, classes = dataiter.next() 错误是因为版本问题
可以改成
inputs, classes = next(dataiter) ,但是运行还是报错
于是我查看命令窗口, 出现:
Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
它在后面显示了,需要把KMP_DUPLICATE_LIB_OK 设置为OK
于是进行了以下操作:
import os
os.environ[‘KMP_DUPLICATE_LIB_OK’] = ‘True’
终于可以运行啦!
AttributeError: ‘_SingleProcessDataLoaderIter‘ object has no attribute ‘next‘
最新推荐文章于 2024-07-11 19:45:38 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)