kaknikhil commented on a change in pull request #564:
URL: https://github.com/apache/madlib/pull/564#discussion_r623289770



##########
File path: src/modules/convex/task/mlp.hpp
##########
@@ -84,9 +99,14 @@ class MLP {
     const static int RELU = 0;
     const static int SIGMOID = 1;
     const static int TANH = 2;
+    const double EPS_STABLE = 1.e-18;

Review comment:
       we don't need this variable anymore right ?

##########
File path: src/ports/postgres/modules/convex/test/mlp.sql_in
##########
@@ -1538,3 +1539,114 @@ SELECT mlp_predict(
     'id',
     'mlp_prediction_batch_output',
     'output');
+
+-- Test rmsprop
+DROP TABLE IF EXISTS mlp_class_batch, mlp_class_batch_summary, 
mlp_class_batch_standardization;
+
+SELECT mlp_classification(
+    'iris_data_batch',    -- Source table
+    'mlp_class_batch',    -- Destination table
+    'independent_varname',   -- Input features
+    'dependent_varname',        -- Label
+    ARRAY[5],   -- Number of units per layer
+    'learning_rate_init=0.1,
+    learning_rate_policy=constant,
+    n_iterations=5,
+    tolerance=0,
+    batch_size=5,
+    n_epochs=15,
+    rho=0.9,
+    solver=rmsprop,
+    eps=0.00000001',
+    'sigmoid',
+    '',
+    FALSE,           -- Warm start
+    FALSE
+);
+SELECT assert
+        (
+        source_table        = 'iris_data_batch' AND
+        independent_varname = 'independent_varname' AND
+        dependent_varname   = 'dependent_varname' AND
+        original_source_table = 'iris_data_does_not_exist' AND
+        original_independent_varname = 'attributes' AND
+        original_dependent_varname = 'class::TEXT' AND
+        original_dependent_vartype = 'text' AND
+        tolerance         = 0 AND
+        learning_rate_init = 0.1 AND
+        learning_rate_policy = 'constant' AND
+        layer_sizes = ARRAY[4,5,3] AND
+        activation = 'sigmoid' AND
+        is_classification = 't' AND
+        classes     = '{1,2,3}' AND
+        weights  = '1' AND
+        grouping_col    = NULL AND
+        solver = 'rmsprop' AND
+        rho = 0.9 AND
+        eps = 0.00000001,
+        'Summary Validation failed for special chars. Actual:' || 
__to_char(summary)
+        ) from (select * from mlp_class_batch_summary order by classes) 
summary;
+
+DROP TABLE IF EXISTS mlp_prediction_batch_output, 
mlp_prediction_batch_output_summary, 
mlp_prediction_batch_output_standardization;
+SELECT mlp_predict(
+    'mlp_class_batch',
+    'iris_data',
+    'id',
+    'mlp_prediction_batch_output',
+    'output');
+
+-- Test Adam
+DROP TABLE IF EXISTS mlp_class_batch, mlp_class_batch_summary, 
mlp_class_batch_standardization;
+
+SELECT mlp_classification(

Review comment:
       we should also add a test for `mlp_regression` with both adam and rmsprop




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to