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

CPU and GPU gave different results #464

Open
hainguyenct opened this issue Apr 21, 2017 · 1 comment
Open

CPU and GPU gave different results #464

hainguyenct opened this issue Apr 21, 2017 · 1 comment

Comments

@hainguyenct
Copy link

Hello everyone,
I received different results when I tried to train with GPU and CPU.
For using CPU, I got accuracy of 87% while GPU got 82%. Does anyone has met this situation?
Thank you,

@elgalu
Copy link

elgalu commented Mar 4, 2019

Can you double check?

  • all training data is identical
  • all stochastic parts of training use the same random seed and generator
  • all data types are identical precision (e.g. all vectors and matrices are 32-bit or 64-bit floats)

It could be a difference in the execution order of the parallelizable operations following floating point error propagation:
https://discuss.pytorch.org/t/why-different-results-when-multiplying-in-cpu-than-in-gpu/1356/4

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