[ 
https://issues.apache.org/jira/browse/MADLIB-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Frank McQuillan closed MADLIB-1309.
-----------------------------------
    Resolution: Fixed

> Change the way we pass compile_params and fit_params to madlib_keras.fit and 
> madlib_keras.predict
> -------------------------------------------------------------------------------------------------
>
>                 Key: MADLIB-1309
>                 URL: https://issues.apache.org/jira/browse/MADLIB-1309
>             Project: Apache MADlib
>          Issue Type: Improvement
>          Components: Deep Learning
>            Reporter: Nandish Jayaram
>            Assignee: Frank McQuillan
>            Priority: Major
>             Fix For: v1.16
>
>
> Based on the code in PR [https://github.com/apache/madlib/pull/355:]
> Currently we have to pass in the compile_params and fit_params as follows
> {code}
> SELECT madlib.madlib_keras_fit(... , '''optimizer''=SGD(lr=0.01, decay=1e-6, 
> nesterov=True), ''loss''=''categorical_crossentropy'', 
> ''metrics''=[''accuracy'']'::text,
>  ,'''batch_size''=2, ''epochs''=1, ''verbose''=0'::text ...)
> {code}
> Internally in the code we use a function called 
> `convert_string_of_args_to_dict` which does some string parsing and then 
> calls eval to create a dictionary. This is bug prone and unsafe. We should 
> look into using the function `extract_keyvalue_params` (might have to change 
> it. We can easily write a unit test for `extract_keyvalue_params`)
> We should also think about how complicated compile_params can get and how can 
> we generalize the code.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to