From fdaeea11e8f6a0affa91c89e80a018c49b60bed9 Mon Sep 17 00:00:00 2001 From: Alex Mallen Date: Sun, 16 Apr 2023 18:23:57 -0400 Subject: [PATCH] fix swapped labels and probs --- elk/calibration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elk/calibration.py b/elk/calibration.py index db56fa02..23a48b8e 100644 --- a/elk/calibration.py +++ b/elk/calibration.py @@ -34,8 +34,8 @@ def update(self, labels: Tensor, probs: Tensor) -> "CalibrationError": assert labels.shape == probs.shape assert torch.is_floating_point(probs) - self.labels.append(probs) - self.pred_probs.append(labels) + self.labels.append(labels) + self.pred_probs.append(probs) return self def compute(self, p: int = 2) -> CalibrationEstimate: