gorkaartola commited on
Commit
e25a90f
1 Parent(s): 9819d89

Upload metric_for_tp_fp_samples.py

Browse files
Files changed (1) hide show
  1. metric_for_tp_fp_samples.py +3 -3
metric_for_tp_fp_samples.py CHANGED
@@ -98,7 +98,7 @@ class metric_tp_fp_Datasets(evaluate.Metric):
98
  results = self.threshold(logits, prediction_strategy[1])
99
  elif prediction_strategy[0] == "topk":
100
  results = self.topk(logits, prediction_strategy[1])
101
- return results
102
  #Prediction strategy functions______________________________________________
103
  def argmax_max(self, logits):
104
  predictions = []
@@ -132,8 +132,8 @@ class metric_tp_fp_Datasets(evaluate.Metric):
132
  return predictions
133
  def topk(self, logits, topk):
134
  predictions = logits.topk(topk).indices.tolist()
135
- print(predictions)
136
- return predictions
137
 
138
  #Builds a report with the metrics####################################################
139
  def metrics_report(self, true_positives = "", false_positives = ""):
 
98
  results = self.threshold(logits, prediction_strategy[1])
99
  elif prediction_strategy[0] == "topk":
100
  results = self.topk(logits, prediction_strategy[1])
101
+ return results
102
  #Prediction strategy functions______________________________________________
103
  def argmax_max(self, logits):
104
  predictions = []
 
132
  return predictions
133
  def topk(self, logits, topk):
134
  predictions = logits.topk(topk).indices.tolist()
135
+ print(predictions)
136
+ return predictions
137
 
138
  #Builds a report with the metrics####################################################
139
  def metrics_report(self, true_positives = "", false_positives = ""):