From 2a1dbd9d2d23bc8a2aa707dc37cbe4f3634c7127 Mon Sep 17 00:00:00 2001 From: Bibek K C Date: Thu, 5 Sep 2024 11:03:44 +0900 Subject: [PATCH] Supports mps device IndexType --- mmengine/structures/instance_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmengine/structures/instance_data.py b/mmengine/structures/instance_data.py index 369d445f28..9de326cf25 100644 --- a/mmengine/structures/instance_data.py +++ b/mmengine/structures/instance_data.py @@ -26,7 +26,7 @@ LongTypeTensor = Union[torch.LongTensor, torch.cuda.LongTensor] IndexType: Union[Any] = Union[str, slice, int, list, LongTypeTensor, - BoolTypeTensor, np.ndarray] + BoolTypeTensor, np.ndarray, torch.Tensor] # torch.Tensor is added to support mps device tensor types # Modified from