Exemplo n.º 1
0
 def _setup_metrics(self):
     self.metric_functions = {}  # needed to shadow class variable
     self.metric_functions[LOSS] = self.eval_loss_function
     self.metric_functions[ACCURACY] = CategoryAccuracy(
         name='metric_accuracy')
     self.metric_functions[HITS_AT_K] = HitsAtKMetric(
         k=self.top_k, name='metric_top_k_hits')
Exemplo n.º 2
0
 def _setup_metrics(self):
     self.metric_functions = {}  # needed to shadow class variable
     # softmax_cross_entropy loss metric
     self.metric_functions[LOSS] = SoftmaxCrossEntropyMetric(
         num_classes=self.num_classes,
         feature_loss=self.loss,
         name='eval_loss')
     self.metric_functions[ACCURACY] = CategoryAccuracy(
         name='metric_accuracy')
     self.metric_functions[HITS_AT_K] = HitsAtKMetric(
         k=self.top_k, name='metric_top_k_hits')