From cd50d666bebc0f501dcf2fd18b2204012ab77ace Mon Sep 17 00:00:00 2001 From: Aaron Lun Date: Fri, 14 Dec 2018 05:22:23 +0000 Subject: [PATCH] Correctly refer to static data member, fixes #1. --- src/optimize.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/optimize.cpp b/src/optimize.cpp index 756add50..8d1cfd44 100644 --- a/src/optimize.cpp +++ b/src/optimize.cpp @@ -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(tail_embedding, grad_d, k, d); } @@ -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] +=