From 20f3d17ac904fb39c265ac934fb1947599ecf890 Mon Sep 17 00:00:00 2001 From: Arne Binder Date: Tue, 5 Nov 2024 11:21:46 +0100 Subject: [PATCH] fix --- src/pytorch_ie/pipeline.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pytorch_ie/pipeline.py b/src/pytorch_ie/pipeline.py index 6a65f976..05383acb 100644 --- a/src/pytorch_ie/pipeline.py +++ b/src/pytorch_ie/pipeline.py @@ -54,11 +54,7 @@ def __init__( **kwargs, ): self.taskmodule = taskmodule - device_str = ( - torch.device("cpu" if device < 0 else f"cuda:{device}") - if isinstance(device, int) - else device - ) + device_str = ("cpu" if device < 0 else f"cuda:{device}") if isinstance(device, int) else device self.device = torch.device(device_str) self.binary_output = binary_output