From 86c4af3c09e6237b460d624dc1f0b789f697511e Mon Sep 17 00:00:00 2001 From: kaylode Date: Thu, 4 May 2023 17:37:07 +0100 Subject: [PATCH] :wrench: fix small bug --- theseus/cv/classification/metrics/projection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/theseus/cv/classification/metrics/projection.py b/theseus/cv/classification/metrics/projection.py index beaec98..2f7dba0 100644 --- a/theseus/cv/classification/metrics/projection.py +++ b/theseus/cv/classification/metrics/projection.py @@ -44,7 +44,8 @@ def update(self, outputs: Dict[str, Any], batch: Dict[str, Any]): torch.argmax(outputs["outputs"].detach().cpu(), dim=1).numpy().tolist() ) inputs = batch["inputs"] - targets = batch["targets"].numpy().tolist() + if self.has_labels: + targets = batch["targets"].numpy().tolist() img_names = batch["img_names"] for i, _ in enumerate(features):