kaknikhil commented on a change in pull request #393: DL: Add support for 
reporting various metrics in fit/evaluate
URL: https://github.com/apache/madlib/pull/393#discussion_r285700995
 
 

 ##########
 File path: src/ports/postgres/modules/deep_learning/madlib_keras.py_in
 ##########
 @@ -459,14 +448,10 @@ def fit_transition(state, ind_var, dep_var, 
current_seg_id, num_classes,
                                 previous_state, SD['model_shapes'])
         SD['segment_model'] = segment_model
         image_count = 0
-        agg_loss = 0
-        agg_accuracy = 0
         agg_image_count = 0
     else:
         segment_model = SD['segment_model']
-        #TODO we don't need to deserialize the weights here.
-        agg_loss, agg_accuracy, agg_image_count, _ = 
madlib_keras_serializer.deserialize_weights(
-            state, SD['model_shapes'])
+        agg_image_count = float(np.fromstring(state, dtype=np.float32)[0])
 
 Review comment:
   It's good that we are not deserializing the weights just to get the image 
count but can we move this code to the serializer file so that all the logic 
stays in one place?

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