Skip to content

Commit

Permalink
Merge pull request #4 from CodingCat/patch-1
Browse files Browse the repository at this point in the history
Fix typo in generated code of sigmod func
  • Loading branch information
hcho3 authored Aug 30, 2017
2 parents eab8e71 + f63891f commit 5e22d6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/pred_transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sigmoid(const Model& model, bool batch) {
"const float alpha = (float)") + treelite::common::ToString(alpha) + ";",
"int64_t i;",
"#pragma omp parallel for schedule(static) num_threads(nthread) \\",
" default(none) firstprivate(alpha) shared(pred) private(i) \\",
" default(none) firstprivate(alpha) shared(pred) private(i)",
"for (i = 0; i < ndata; ++i) {",
" pred[i] = 1.0f / (1 + expf(-alpha * pred[i]));",
"}",
Expand Down

0 comments on commit 5e22d6b

Please sign in to comment.