Reputation: 1
I wrote a Theano machine learning program. But I got two absolutely different results between on CPU and on GPU.
Below is the log.(only a tiny part of log)
The loss function will quickly decrease and then converg to 0.2 on CPU.
However, the loss function will increase and finally become NaN on GPU.
What mistakes may be in my program? Or what should I take into attention? Thank you!
Upvotes: 0
Views: 645
Reputation: 1877
Check out this thread... https://github.com/fchollet/keras/issues/511 Basically adding;
optimizer_excluding=cudnn
in the .theanorc solved it for me, but solution runs a slower.
Upvotes: 0
Reputation: 35451
Could it be that CPU is using float64
(double precision) and the GPU is using float32
(single precision)? Here you can look up the configuration flags: http://deeplearning.net/software/theano/library/config.html
Upvotes: 0