Skip to content

Commit

Permalink
Fix building with gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
mwydmuch committed May 17, 2021
1 parent 5a3b8d8 commit 9bc1951
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ void Base::trainOnline(ProblemData& problemData, Args& args) {
if (problemData.binLabels[r] == firstClass) ++firstClassCount;

double pred = dotVectors(features, W, wSize);
//if (pred > 6.5 || pred < -6.5) continue;
//if (pred > 10 || pred < -10) continue;
double grad = gradFunc(label, pred, problemData.invPs) * problemData.instancesWeights[r];
if (!std::isinf(grad) && !isnan(grad)) updateFunc(W, G, features, grad, t, args);
if (!std::isinf(grad) && !std::isnan(grad)) updateFunc(W, G, features, grad, t, args);

// Report loss
// loss += lossFunc(label, pred, problemData.invPs);
Expand Down

0 comments on commit 9bc1951

Please sign in to comment.