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

Gradient test case may fail in GPU single precision mode #7

Open
ychfan opened this issue Sep 29, 2016 · 4 comments
Open

Gradient test case may fail in GPU single precision mode #7

ychfan opened this issue Sep 29, 2016 · 4 comments

Comments

@ychfan
Copy link

ychfan commented Sep 29, 2016

When running the test case in src/caffe/test/test_st_layer_hard.cpp, some cases in GPU single precision mode may fail.

@daerduoCarey
Copy link
Owner

Yes, I found the same problem when I did my experiments.

I think it’s the precision problem at the point of sub gradient. Just use the double precision mode and you should be fine.

Thank you.

@hugguofeng
Copy link

I have the same question, and how did you solve it? When I make test, I see the question.

@daerduoCarey
Copy link
Owner

I didn't solve it. As i said before, I think that's the inherent precision problem. I chose to use double precision float during my experiments. Thank you.

@seed93
Copy link

seed93 commented Apr 11, 2017

@daerduoCarey double precision also fails in some cases.
When theta is set to identity matrix, unit test fails.

		Dtype *theta = this->blob_theta_->mutable_cpu_data();
		caffe_set(this->blob_theta_->count(), Dtype(0), theta);
		theta[0] += 1;
		theta[4] += 1;
		theta[6] += 1;
		theta[10] += 1;

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

4 participants