This is an automated email from the ASF dual-hosted git repository. njayaram pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/madlib.git
commit 880358453e8b027024f7cca19c5b747d96af6d50 Author: Nandish Jayaram <[email protected]> AuthorDate: Tue Apr 23 16:56:55 2019 -0700 MLP: Fix warm start weights initialization issue JIRA: MADLIB-1329 Change code to correctly initialize weights with warm start. In the C++ layer the weights were not getting initialized correctly from the previously learnt model, this commit fixes that issue. Closes #376 --- src/modules/convex/mlp_igd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/convex/mlp_igd.cpp b/src/modules/convex/mlp_igd.cpp index 599170b..d838e76 100644 --- a/src/modules/convex/mlp_igd.cpp +++ b/src/modules/convex/mlp_igd.cpp @@ -107,7 +107,7 @@ mlp_igd_transition::run(AnyType &args) { layer_start + j * state.task.model.u[k].rows() + i); } } - layer_start = state.task.model.u[k].rows() * state.task.model.u[k].cols(); + layer_start += state.task.model.u[k].rows() * state.task.model.u[k].cols(); } } else { // initialize the model with appropriate coefficients @@ -219,7 +219,7 @@ mlp_minibatch_transition::run(AnyType &args) { layer_start + j * state.model.u[k].rows() + i); } } - layer_start = state.model.u[k].rows() * state.model.u[k].cols(); + layer_start += state.model.u[k].rows() * state.model.u[k].cols(); } } else { // initialize the model with appropriate coefficients
