mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-27 01:59:08 +00:00
refactor analysis.py
This commit is contained in:
parent
188a7bbf1f
commit
7b1e54eed8
Binary file not shown.
@ -145,9 +145,8 @@ class error(ValueError):
|
||||
|
||||
def _init_device (setting, arg): #initiates computation device for ANNs
|
||||
if setting == "cuda":
|
||||
temp = setting + ":" + str(arg)
|
||||
try:
|
||||
return torch.device(temp if torch.cuda.is_available() else "cpu")
|
||||
return torch.device(setting + ":" + str(arg) if torch.cuda.is_available() else "cpu")
|
||||
except:
|
||||
raise error("could not assign cuda or cpu")
|
||||
elif setting == "cpu":
|
||||
|
Loading…
Reference in New Issue
Block a user