kaknikhil commented on a change in pull request #425: DL: Add training for
multiple models
URL: https://github.com/apache/madlib/pull/425#discussion_r310261553
##########
File path: src/ports/postgres/modules/deep_learning/madlib_keras_wrapper.py_in
##########
@@ -82,6 +82,21 @@ def set_keras_session(device_name, gpus_per_host,
segments_per_host):
session = K.tf.Session(config=config)
K.set_session(session)
+def get_keras_session(device_name, gpus_per_host, segments_per_host):
+ config = K.tf.ConfigProto()
+ if gpus_per_host > 0:
+ memory_fraction = get_gpu_memory_fraction(gpus_per_host,
segments_per_host)
+ config.gpu_options.allow_growth = False
+ config.gpu_options.per_process_gpu_memory_fraction = memory_fraction
+ session = tf.Session(config=config)
+ return session
+
+def clear_keras_session():
+ plpy.info("Clear session called")
Review comment:
is this intentional or leftover ?
----------------------------------------------------------------
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