kaknikhil commented on a change in pull request #425: DL: Add training for 
multiple models
URL: https://github.com/apache/madlib/pull/425#discussion_r310257244
 
 

 ##########
 File path: src/ports/postgres/modules/deep_learning/madlib_keras.py_in
 ##########
 @@ -632,9 +698,12 @@ def internal_keras_eval_transition(state, dependent_var, 
independent_var,
     total_images = get_image_count_per_seg_from_array(current_seg_id, seg_ids,
                                                       images_per_seg)
 
-    if agg_image_count == total_images:
-        SD.pop('segment_model', None)
-        clear_keras_session()
+    # Clean the session on the last buffer of last iteration
+    if agg_image_count == total_images and is_final:
+        K.clear_session()
 
 Review comment:
   Again use `clear_keras_session()`

----------------------------------------------------------------
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