File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1160,13 +1160,13 @@ class LearnerImpl : public LearnerIO {
11601160 }
11611161
11621162 this ->ValidateDMatrix (train.get (), true );
1163-
1164- CHECK_GE (this ->learner_model_param_ .OutputLength (), in_gpair->NumSplitTargets ())
1165- << " The number of columns in gradient should be equal to or lesser than the number of "
1166- " targets/classes in the model." ;
11671163 if (in_gpair->HasValueGrad ()) {
11681164 CHECK_EQ (this ->learner_model_param_ .OutputLength (), in_gpair->NumTargets ())
11691165 << " Value gradient should have the same number of targets as the overall model." ;
1166+ } else {
1167+ CHECK_EQ (this ->learner_model_param_ .OutputLength (), in_gpair->NumSplitTargets ())
1168+ << " The number of columns in gradient should be equal to the number of "
1169+ " targets/classes in the model." ;
11701170 }
11711171 auto predt = prediction_container_.Cache (train, ctx_.Device ());
11721172 this ->gbm_ ->DoBoost (train.get (), in_gpair, predt.get (), obj_.get ());
You can’t perform that action at this time.
0 commit comments