kaknikhil opened a new pull request #407: DL: Create one keras session per iteration for pg in fit and evaluate URL: https://github.com/apache/madlib/pull/407 JIRA: MADLIB-1356 Currently for postgres, we create one keras session in fit/evaluate/predict and keep it open for all the iterations and then close it at the end. We did a few experiments and found out that if we create 1 keras session per iteration , it performs slightly better. So this commit modifies the code to make pg behave the same as gpdb(1 session per iteration) in fit_transition, eval_transition and internal_predict functions. We also changed set_keras_session to use a device_name to be consistent with other keras operations. This commit also fixes the following bug: If gpus are available on the host but the user passed in 0 for the gpus_per_host param, we still end up using gpu memory. This is because in the madlib_keras.fit UDF we call model.get_weights() to initialize the model and this function ends up using gpu(s) if there are any available. Also refactored some image count related code
---------------------------------------------------------------- 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
