gorkaartola commited on
Commit
cb50ae9
1 Parent(s): 46c738d

Update metric_for_tp_fp_samples.py

Browse files
Files changed (1) hide show
  1. metric_for_tp_fp_samples.py +4 -4
metric_for_tp_fp_samples.py CHANGED
@@ -195,10 +195,10 @@ class metric_tp_fp_Datasets(evaluate.Metric):
195
  """Returns the scores"""
196
  # TODO: Compute the different scores of the metric
197
  predictions = torch.from_numpy(np.array(predictions, dtype = 'float32'))
198
- classes = []
199
- for value in references:
200
- if value[0] not in classes:
201
- classes.append(value[0])
202
  results = {}
203
  for prediction_strategy in prediction_strategies:
204
  prediction_strategy_name = '-'.join(map(str, prediction_strategy))
 
195
  """Returns the scores"""
196
  # TODO: Compute the different scores of the metric
197
  predictions = torch.from_numpy(np.array(predictions, dtype = 'float32'))
198
+ classes = [i for i in range[len(predictions)[0]]
199
+ #for value in references:
200
+ # if value[0] not in classes:
201
+ # classes.append(value[0])
202
  results = {}
203
  for prediction_strategy in prediction_strategies:
204
  prediction_strategy_name = '-'.join(map(str, prediction_strategy))