Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch1训练一个分类器一节中iter的next()用法有误 #140

Open
PhilipGAQ opened this issue Jul 19, 2023 · 1 comment
Open

ch1训练一个分类器一节中iter的next()用法有误 #140

PhilipGAQ opened this issue Jul 19, 2023 · 1 comment

Comments

@PhilipGAQ
Copy link

原文使用
images,labels=dataiter.next()
出现报错:
AttributeError: '_MultiProcessingDataLoaderIter' object has no attribute 'next'
应更正为
images, labels = next(dataiter)

@ldwDavid
Copy link

ldwDavid commented Jan 9, 2024

没错,估计是库的更新导致的,修改为next(dataiter)后能正常运行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants