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

UNet2DS tensorflow non-deterministic training #1

Open
alexklibisz opened this issue Jul 17, 2017 · 3 comments
Open

UNet2DS tensorflow non-deterministic training #1

alexklibisz opened this issue Jul 17, 2017 · 3 comments

Comments

@alexklibisz
Copy link
Owner

Just making a note for future reference that training the UNet2DS model on the GPU with Tensorflow backend results in non-deterministic gradient updates, which results in non-deterministic final results. The final submission are typically within 2% of each other in terms of mean F1 score, but still this adds a confounding factor when trying to compare changes to the architecture or training strategy.

There is a lot of material online about TF's non-determinism. Most of it points to the fact that the underlying CuDNN implementation uses non-deterministic reductions for convolutions (i.e. floating point operations are not necessarily associative). The best, most recent insight I could find was in this pull-request, with comments indicating there is supposedly a forthcoming fix to address this issue.

@alexklibisz
Copy link
Owner Author

This also seems to make a non-trivial difference when training UNet1D. It seems most of the new libraries now are using CuDNN, so I'm not sure there's a way around this without some fix in CuDNN.

@saeedalahmari3
Copy link

I have the same issue now with U-Net for segmentation making dice coef different (+3) every run with the same seed. Were you able to find a solution for this?

@alexklibisz
Copy link
Owner Author

No, and based on the issues linked to the PR in my original post, it looks like it hasn't been resolved yet.

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