예제 #1
0
 def graph_fn():
     values = [0.1, 0.2, 0.3, 0.4, 0.42, 0.44, 0.46, 0.48, 0.50]
     visualization_utils.add_cdf_image_summary(values,
                                               'PositiveAnchorLoss')
     cdf_image_summary = tf.get_collection(
         key=tf.GraphKeys.SUMMARIES)[0]
     return cdf_image_summary
예제 #2
0
 def _summarize_anchor_classification_loss(self, class_ids, cls_losses):
   positive_indices = tf.where(tf.greater(class_ids, 0))
   positive_anchor_cls_loss = tf.squeeze(
       tf.gather(cls_losses, positive_indices), axis=1)
   visualization_utils.add_cdf_image_summary(positive_anchor_cls_loss,
                                             'PositiveAnchorLossCDF')
   negative_indices = tf.where(tf.equal(class_ids, 0))
   negative_anchor_cls_loss = tf.squeeze(
       tf.gather(cls_losses, negative_indices), axis=1)
   visualization_utils.add_cdf_image_summary(negative_anchor_cls_loss,
                                             'NegativeAnchorLossCDF')
예제 #3
0
 def _summarize_anchor_classification_loss(self, class_ids, cls_losses):
   positive_indices = tf.where(tf.greater(class_ids, 0))
   positive_anchor_cls_loss = tf.squeeze(
       tf.gather(cls_losses, positive_indices), axis=1)
   visualization_utils.add_cdf_image_summary(positive_anchor_cls_loss,
                                             'PositiveAnchorLossCDF')
   negative_indices = tf.where(tf.equal(class_ids, 0))
   negative_anchor_cls_loss = tf.squeeze(
       tf.gather(cls_losses, negative_indices), axis=1)
   visualization_utils.add_cdf_image_summary(negative_anchor_cls_loss,
                                             'NegativeAnchorLossCDF')
 def test_add_cdf_image_summary(self):
   values = [0.1, 0.2, 0.3, 0.4, 0.42, 0.44, 0.46, 0.48, 0.50]
   visualization_utils.add_cdf_image_summary(values, 'PositiveAnchorLoss')
   cdf_image_summary = tf.get_collection(key=tf.GraphKeys.SUMMARIES)[0]
   with self.test_session():
     cdf_image_summary.eval()
예제 #5
0
 def test_add_cdf_image_summary(self):
   values = [0.1, 0.2, 0.3, 0.4, 0.42, 0.44, 0.46, 0.48, 0.50]
   visualization_utils.add_cdf_image_summary(values, 'PositiveAnchorLoss')
   cdf_image_summary = tf.get_collection(key=tf.GraphKeys.SUMMARIES)[0]
   with self.test_session():
     cdf_image_summary.eval()