make xgcombine buffer work

This commit is contained in:
tqchen
2014-08-17 22:49:36 -07:00
parent 4ed4b08146
commit 0d9a8c042c
5 changed files with 205 additions and 207 deletions

View File

@@ -171,7 +171,7 @@ class SoftmaxMultiClassObj : public IObjFunction {
rec[k] = preds[j * nclass + k];
}
Softmax(&rec);
unsigned label = static_cast<unsigned>(info.labels[j]);
int label = static_cast<int>(info.labels[j]);
utils::Check(label < nclass, "SoftmaxMultiClassObj: label exceed num_class");
const float wt = info.GetWeight(j);
for (int k = 0; k < nclass; ++k) {