mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-10 06:54:44 +00:00
analysis.py v 1.1.0.006
This commit is contained in:
parent
c9ab13ec21
commit
d19746164a
@ -7,10 +7,12 @@
|
|||||||
# current benchmark of optimization: 1.33 times faster
|
# current benchmark of optimization: 1.33 times faster
|
||||||
# setup:
|
# setup:
|
||||||
|
|
||||||
__version__ = "1.1.0.005"
|
__version__ = "1.1.0.006"
|
||||||
|
|
||||||
# changelog should be viewed using print(analysis.__changelog__)
|
# changelog should be viewed using print(analysis.__changelog__)
|
||||||
__changelog__ = """changelog:
|
__changelog__ = """changelog:
|
||||||
|
1.1.0.006:
|
||||||
|
- removed useless try statements
|
||||||
1.1.0.005:
|
1.1.0.005:
|
||||||
- removed impossible outcomes
|
- removed impossible outcomes
|
||||||
1.1.0.004:
|
1.1.0.004:
|
||||||
@ -158,10 +160,8 @@ class error(ValueError):
|
|||||||
|
|
||||||
def _init_device(setting, arg): # initiates computation device for ANNs
|
def _init_device(setting, arg): # initiates computation device for ANNs
|
||||||
if setting == "cuda":
|
if setting == "cuda":
|
||||||
try:
|
|
||||||
return torch.device(setting + ":" + str(arg) if torch.cuda.is_available() else "cpu")
|
return torch.device(setting + ":" + str(arg) if torch.cuda.is_available() else "cpu")
|
||||||
elif setting == "cpu":
|
elif setting == "cpu":
|
||||||
try:
|
|
||||||
return torch.device("cpu")
|
return torch.device("cpu")
|
||||||
else:
|
else:
|
||||||
raise error("specified device does not exist")
|
raise error("specified device does not exist")
|
||||||
|
Loading…
Reference in New Issue
Block a user