From d8985447cba901a0010de5e3b8a085771f014738 Mon Sep 17 00:00:00 2001 From: function2 Date: Tue, 18 Jul 2023 20:18:46 +0800 Subject: [PATCH] Add str type annotation to device parameter in ToTensorD Signed-off-by: function2 --- monai/transforms/utility/dictionary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monai/transforms/utility/dictionary.py b/monai/transforms/utility/dictionary.py index 3ef8cd4959..15025ac961 100644 --- a/monai/transforms/utility/dictionary.py +++ b/monai/transforms/utility/dictionary.py @@ -514,7 +514,7 @@ def __init__( self, keys: KeysCollection, dtype: torch.dtype | None = None, - device: torch.device | None = None, + device: torch.device | str | None = None, wrap_sequence: bool = True, track_meta: bool | None = None, allow_missing_keys: bool = False,