gorkaartola commited on
Commit
1ec71a9
1 Parent(s): efad939

Update metric_for_tp_fp_samples.py

Browse files
Files changed (1) hide show
  1. metric_for_tp_fp_samples.py +4 -3
metric_for_tp_fp_samples.py CHANGED
@@ -106,7 +106,9 @@ class metric_tp_fp_Datasets(evaluate.Metric):
106
  for prediction in argmax:
107
  predicted_indexes = [prediction.item()]
108
  predictions.append(predicted_indexes)
109
- return predictions
 
 
110
  def softmax_threshold(logits, threshold):
111
  predictions = []
112
  softmax = torch.softmax(logits, dim=-1)
@@ -132,8 +134,7 @@ 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 = ""):
 
106
  for prediction in argmax:
107
  predicted_indexes = [prediction.item()]
108
  predictions.append(predicted_indexes)
109
+ print("JAAAAAAAAAARL")
110
+ print(predictions)
111
+ return predictions
112
  def softmax_threshold(logits, threshold):
113
  predictions = []
114
  softmax = torch.softmax(logits, dim=-1)
 
134
  return predictions
135
  def topk(self, logits, topk):
136
  predictions = logits.topk(topk).indices.tolist()
137
+ return predictions
 
138
 
139
  #Builds a report with the metrics####################################################
140
  def metrics_report(self, true_positives = "", false_positives = ""):