Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneBinder committed Nov 5, 2024
1 parent f3cfa0e commit 20f3d17
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/pytorch_ie/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 20f3d17

Please sign in to comment.