-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: change image class to use PyTorch tensors and methods (#506)
Closes #505 ### Summary of Changes feat: Changed Image class to use PyTorch tensors refactor: Image class now uses PyTorch transform methods --------- Co-authored-by: megalinter-bot <[email protected]>
- Loading branch information
1 parent
28ed5c9
commit efa2b61
Showing
175 changed files
with
1,754 additions
and
1,276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"""Configuration for Safe-DS.""" | ||
|
||
from ._device import _get_device | ||
|
||
__all__ = [ | ||
"_get_device", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import torch | ||
from torch.types import Device | ||
|
||
|
||
def _get_device() -> Device: | ||
return torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu") |
Oops, something went wrong.