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

TypeError: cannot pickle 'generator' object #25

Open
zhangxiaofan-star opened this issue May 21, 2023 · 5 comments
Open

TypeError: cannot pickle 'generator' object #25

zhangxiaofan-star opened this issue May 21, 2023 · 5 comments

Comments

@zhangxiaofan-star
Copy link

您好,
很感谢您的工作,我收获很多。但是我在使用GRK4受体测试的时候,TypeError: cannot pickle 'generator' object这个错误是什么情况呀

image

@pengxingang
Copy link
Owner

你好,你可以看看报错时变量pool的值是否正常;另外你可以尝试使用examples中pdb,看看是否也会出现这个错误。

@zhangxiaofan-star
Copy link
Author

好的,谢谢您,我在训练的时候遇到如下报错,torch_geometric中的DataLoader方法定义中我没有看到pin_memory参数,请问这个是什么问题?
1685108145108

@pengxingang
Copy link
Owner

你好,根据错误信息SyntaxError应该是语法错误,请检查修改的代码是否有语法错误(例如缩进、逗号等)。torch_geometricDataloader是有pin_memory参数的,参见这里,其中kwargs接收pin_memory参数。

@zhangxiaofan-star
Copy link
Author

谢谢,这个问题以及解决了,在训练过程中又遇到了如下问题,请问这个要怎么解决呀
image

1685188558647

@pengxingang
Copy link
Owner

你好,代码经过测试一般不会出现这个问题。不知你是否在哪里做了修改,或是数据文件没有放在正确的位置。你可以通过debug查看出问题时的变量值,或是提供更完整的运行信息。

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