jingyimei commented on a change in pull request #359: DL: Remove eval statement
URL: https://github.com/apache/madlib/pull/359#discussion_r270587796
 
 

 ##########
 File path: src/ports/postgres/modules/deep_learning/madlib_keras_wrapper.py_in
 ##########
 @@ -56,8 +58,13 @@ def clear_keras_session():
 def compile_and_set_weights(segment_model, compile_params, device_name,
                             previous_state, model_shapes):
     with K.tf.device(device_name):
-        compile_params = convert_string_of_args_to_dict(compile_params)
-        segment_model.compile(**compile_params)
+
+        optimizers = get_optimizers()
+        (opt_name,final_args,compile_dict) = 
parse_compile_params(compile_params)
+
+        segment_model.compile(optimizer=optimizers[opt_name](**final_args),
 
 Review comment:
   What kind of error will it throw if `opt_name` is not a valid key in 
optimizers? Do we want to catch it by ourselves, or just throw whatever keras 
throws?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to