jpxkqx commited on
Commit
98e241e
1 Parent(s): fff04bf

Remove name in output

Browse files
Files changed (2) hide show
  1. peak_signal_to_noise_ratio.py +1 -1
  2. tests.py +2 -2
peak_signal_to_noise_ratio.py CHANGED
@@ -89,5 +89,5 @@ class PeakSignaltoNoiseRatio(evaluate.Metric):
89
  psnrs = list(map(
90
  lambda args: peak_signal_noise_ratio(*args, data_range=data_range), samples
91
  ))
92
- return {"Peak Signal-to-Noise Ratio": np.average(psnrs, weights=sample_weight)}
93
 
 
89
  psnrs = list(map(
90
  lambda args: peak_signal_noise_ratio(*args, data_range=data_range), samples
91
  ))
92
+ return np.average(psnrs, weights=sample_weight)
93
 
tests.py CHANGED
@@ -2,11 +2,11 @@ test_cases = [
2
  {
3
  "predictions": [[0.1, 0.1], [1.1, 0.1]],
4
  "references": [[0.1, 0.1], [1.1, 0.1]],
5
- "result": {"Peak Signal-to-Noise Ratio": 23.010298856486173}
6
  },
7
  {
8
  "predictions": [[0, 1], [0, 0]],
9
  "references": [[0, 0], [-1, -1]],
10
- "result": {"Peak Signal-to-Noise Ratio": 1.2493873660829993}
11
  }
12
  ]
 
2
  {
3
  "predictions": [[0.1, 0.1], [1.1, 0.1]],
4
  "references": [[0.1, 0.1], [1.1, 0.1]],
5
+ "result": 23.010298856486173
6
  },
7
  {
8
  "predictions": [[0, 1], [0, 0]],
9
  "references": [[0, 0], [-1, -1]],
10
+ "result": 1.2493873660829993
11
  }
12
  ]