kaknikhil commented on a change in pull request #375: DL: Add GPU support for
evaluate
URL: https://github.com/apache/madlib/pull/375#discussion_r278762999
##########
File path: src/ports/postgres/modules/deep_learning/madlib_keras.py_in
##########
@@ -391,14 +373,17 @@ def fit_transition(state, ind_var, dep_var,
current_seg_id, num_classes,
with K.tf.device(device_name):
updated_weights = segment_model.get_weights()
-
- if SD['buffer_count'] == total_buffers:
- if total_buffers == 0:
- plpy.error('total buffers is 0')
-
- agg_loss /= total_buffers
- agg_accuracy /= total_buffers
- if not is_pg:
+ if is_platform_pg():
+ total_buffers_per_seg = total_buffers_per_seg[0]
+ else:
+ total_buffers_per_seg =
total_buffers_per_seg[all_seg_ids.index(current_seg_id)]
+ if total_buffers_per_seg == 0:
+ plpy.error('total buffers is 0')
Review comment:
plpy.info prints the segment no along with the error message. For the
message itself, I decided to make it better it in a future PR.
----------------------------------------------------------------
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