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


The following commit(s) were added to refs/heads/master by this push:
     new d5352a4  MLP: Fix convergence based on threshold
d5352a4 is described below

commit d5352a42eda16ef9f6289fe958570115cc66746f
Author: Himanshu Pandey <[email protected]>
AuthorDate: Fri May 24 11:08:15 2019 -0700

    MLP: Fix convergence based on threshold
    
    JIRA: MADLIB-1325
    Fix logic to terminate MLP iterations if the difference in loss between two
    consecutive iterations is less than threshold (when specified). The
    state contains the loss in the last index, the value of that index was
    updated in the wrong dictionary. This commit fixes that.
    
    Closes #398
---
 src/ports/postgres/modules/convex/mlp_igd.py_in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ports/postgres/modules/convex/mlp_igd.py_in 
b/src/ports/postgres/modules/convex/mlp_igd.py_in
index b290c5f..888bed9 100644
--- a/src/ports/postgres/modules/convex/mlp_igd.py_in
+++ b/src/ports/postgres/modules/convex/mlp_igd.py_in
@@ -333,8 +333,9 @@ def mlp(schema_madlib, source_table, output_table, 
independent_varname,
                         )
                         """
                 it.update(train_sql)
-                if it_args['state_size'] == -1:
-                    it_args['state_size'] = it.get_state_size()
+                if it.kwargs['state_size'] == -1:
+                    it.kwargs['state_size'] = it.get_state_size()
+
 
                 if it.test("""
                         {iteration} >= {n_iterations}

Reply via email to