-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Fix intercept initialization for multinomial logistic objective #11786
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
base: master
Are you sure you want to change the base?
Conversation
|
Not sure how to handle the GPU segfaults. Perhaps some maintainer could take over. |
|
Thank you for working on this. I will look into it. |
d731886 to
229b836
Compare
229b836 to
6bb3a5d
Compare
|
I fixed the GPU access for the PR. But still need to go through all the failing CPU tests. |
src/objective/multiclass_obj.cu
Outdated
| common::Mean(this->ctx_, *base_score, &mean_intercepts); | ||
| auto d_mean = mean_intercepts.View(this->ctx_->Device()); | ||
| TransformKernel(this->ctx_, intercept, | ||
| [=] XGBOOST_DEVICE(float v) { return log(v) - d_mean(0); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd make more sense to take the mean after applying logarithms, so that they would end up summing to zero, the same way as other libraries handle it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will handle that. Thank you for pointing out.
closes #11763