From 8bfb8028603e8503845c621e53adce218b7b81bb Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Wed, 4 Sep 2024 03:32:03 +0330 Subject: [PATCH] Fix a typo --- .../metrics/vision/object_detection_average_precision_recall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignite/metrics/vision/object_detection_average_precision_recall.py b/ignite/metrics/vision/object_detection_average_precision_recall.py index f6111af1d1e..6676de64c51 100644 --- a/ignite/metrics/vision/object_detection_average_precision_recall.py +++ b/ignite/metrics/vision/object_detection_average_precision_recall.py @@ -104,7 +104,7 @@ def box_iou(pred_boxes: torch.Tensor, gt_boxes: torch.Tensor, iscrowd: torch.Boo except ImportError: raise ModuleNotFoundError("This metric requires torchvision to be installed.") - precision = torch.double if not torch.device(device) != torch.device("mps") else torch.float32 + precision = torch.double if torch.device(device) != torch.device("mps") else torch.float32 if iou_thresholds is None: iou_thresholds = torch.linspace(0.5, 0.95, 10, device=device, dtype=precision)