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

在图分类任务中如何保证可重复性 #34

Open
pancccool opened this issue Nov 24, 2021 · 3 comments
Open

在图分类任务中如何保证可重复性 #34

pancccool opened this issue Nov 24, 2021 · 3 comments

Comments

@pancccool
Copy link

在使用tf_geometric中的图分类模型时,实验结果不能重复。如何控制tf_geometric的随机性,保证实验结果可重复呢?

@hujunxianligong
Copy link
Member

据我所知,目前TensorFlow的segment操作(用于图的各种消息传播)很难提供deterministic特性(https://github.com/tensorflow/tensorflow/issues/39751),pyg貌似也存在同样的问题。

记得DGL好像是可以实现deterministic操作的。

所以你可以:
1)使用tfg或者pyg,一般多次平均的效果比较稳定(也比较能真实说明运行结果)
2)使用DGL

@pancccool
Copy link
Author

据我说,目前TensorFlow的segment(用于图的各种消息传播)提供了不可确定的特性(https://github.com/tensorflow/tensorflow/issues/39751),pyg假装也存在同样的问题。

记得DGL好像是可以实现确定性操作的。

所以你: 1)使用tfg或者pyg,一般常用的效果比较稳定(也比较能真实说明运行结果) 2)使用DGL

据我说,目前TensorFlow的segment(用于图的各种消息传播)提供了不可确定的特性(https://github.com/tensorflow/tensorflow/issues/39751),pyg假装也存在同样的问题。

记得DGL好像是可以实现确定性操作的。

所以你: 1)使用tfg或者pyg,一般常用的效果比较稳定(也比较能真实说明运行结果) 2)使用DGL

明白了,谢谢!

@hujunxianligong
Copy link
Member

补充一下,如果只是为了保证结果一致(不考虑训练),切换到CPU模式,正产设置各种种子,也就没有deterministic的问题了(这是GPU的问题)

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