Skip to content

Commit

Permalink
update once only for ui modeling
Browse files Browse the repository at this point in the history
  • Loading branch information
chihming committed Apr 16, 2019
1 parent 37d9ede commit 318232c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/proNet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2764,12 +2764,15 @@ void proNet::UpdateCBOWdev(vector< vector<double> >& w_vertex, vector< vector<do
}

// batch update
for (int d=0; d!=dimension;++d)
{
w_vertex[user][d] += user_err[d];
}
for (auto v: bags)
{
w_ptr = &w_context[v];
for (int d=0; d!=dimension;++d)
{
w_vertex[user][d] += user_err[d];
(*w_ptr)[d] += back_err[d];
}
}
Expand Down

0 comments on commit 318232c

Please sign in to comment.