Skip to content

Commit

Permalink
Merge pull request jlmelville#17 from LTLA/master
Browse files Browse the repository at this point in the history
Correctly refer to static data member, fixes jlmelville#1.
  • Loading branch information
jlmelville authored Dec 14, 2018
2 parents a9acefd + e18e03a commit 121292e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ struct SgdWorker : public RcppParallel::Worker {
for (arma::uword d = 0; d < ncol; d++) {
double grad_d = alpha * clip(grad_coeff *
(head_embedding.at(j, d) - tail_embedding.at(k, d)),
gradient.clip_max);
Gradient::clip_max);
head_embedding.at(j, d) += grad_d;
move_other_vertex<DoMoveVertex>(tail_embedding, grad_d, k, d);
}
Expand All @@ -157,7 +157,7 @@ struct SgdWorker : public RcppParallel::Worker {
for (arma::uword d = 0; d < ncol; d++) {
head_embedding.at(j, d) += alpha * clip(grad_coeff *
(head_embedding.at(j, d) - tail_embedding.at(k, d)),
gradient.clip_max);
Gradient::clip_max);
}
}
epoch_of_next_negative_sample[i] +=
Expand Down

0 comments on commit 121292e

Please sign in to comment.