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

Is there some way to make the SA_module and FP_module deterministic #162

Open
Jianghanxiao opened this issue Jan 5, 2022 · 1 comment
Open

Comments

@Jianghanxiao
Copy link

Jianghanxiao commented Jan 5, 2022

Hi,
I use the SAmodule and FPmodule in my network, I try setting all random seeds for torch, numpy and random. However, the results are still not deterministic. Then I check the model, I find that with the same input, the SAmodule will give different outputs. Is there some way to make the SAmodule deterministic?

I think the potential reason for this is that it uses some functions implemented in C, then the random seed cannot be controlled. Do you have some idea on this?

@kefusong
Copy link

kefusong commented Apr 1, 2024

I found out the atomicAdd() function in the .cu file is not fixed in order when called, resulting in a numerical error in the sum of floating points as a result of gradient calculations.
I also found that many networks are based on this package, and how do they deal with this non-determinism?
If determinism is not guaranteed, ablation experiments can be cumbersome.
Thank you!

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