コード例 #1
0
    def _get_measures(self, targets, predictions, logits):
        with tf.variable_scope('measures_{}'.format(self.name)):
            accuracy_val, correct_predictions = get_accuracy(
                targets, predictions, self.name)
            hits_at_k_val, mean_hits_at_k = get_hits_at_k(
                targets, logits, self.top_k, self.name)

        return correct_predictions, accuracy_val, hits_at_k_val, mean_hits_at_k
コード例 #2
0
 def _get_measures(self, targets, predictions):
     with tf.variable_scope('measures_{}'.format(self.name)):
         accuracy, correct_predictions = get_accuracy(
             targets,
             predictions,
             self.name
         )
     return correct_predictions, accuracy