mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-26 09:39:10 +00:00
refactor analysis.py
This commit is contained in:
parent
97a6e7c630
commit
cb3b01863d
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