gorkaartola commited on
Commit
7815822
1 Parent(s): f151b2a

Update 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
@@ -119,8 +119,7 @@ class metric_tp_fp_Datasets(evaluate.Metric):
119
  return predictions
120
  def softmax_topk(self, logits, topk):
121
  softmax = torch.softmax(logits, dim=-1)
122
- predictions = softmax.topk(topk).indices.tolist()
123
- print(predictions)
124
  return predictions
125
  def threshold(self, logits, threshold):
126
  predictions = []
@@ -133,7 +132,8 @@ class metric_tp_fp_Datasets(evaluate.Metric):
133
  return predictions
134
  def topk(self, logits, topk):
135
  predictions = logits.topk(topk).indices.tolist()
136
- return predictions
 
137
 
138
  #Builds a report with the metrics####################################################
139
  def metrics_report(self, true_positives = "", false_positives = ""):
 
119
  return predictions
120
  def softmax_topk(self, logits, topk):
121
  softmax = torch.softmax(logits, dim=-1)
122
+ predictions = softmax.topk(topk).indices.tolist()
 
123
  return predictions
124
  def threshold(self, logits, threshold):
125
  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 = ""):