diff --git a/data analysis/__pycache__/analysis.cpython-37.pyc b/data analysis/__pycache__/analysis.cpython-37.pyc index 3623dd04..a0630c0e 100644 Binary files a/data analysis/__pycache__/analysis.cpython-37.pyc and b/data analysis/__pycache__/analysis.cpython-37.pyc differ diff --git a/data analysis/analysis.py b/data analysis/analysis.py index ca087419..ad72d214 100644 --- a/data analysis/analysis.py +++ b/data analysis/analysis.py @@ -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":