From cb3b01863d9a138ec7963e9b931d43b577283e52 Mon Sep 17 00:00:00 2001 From: ltcptgeneral <35508619+ltcptgeneral@users.noreply.github.com> Date: Thu, 20 Dec 2018 15:05:43 -0600 Subject: [PATCH] refactor analysis.py --- .../__pycache__/analysis.cpython-37.pyc | Bin 24547 -> 24680 bytes data analysis/analysis.py | 3 +-- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/data analysis/__pycache__/analysis.cpython-37.pyc b/data analysis/__pycache__/analysis.cpython-37.pyc index 3623dd0414e84ca65868185408946e78896073a8..a0630c0ec9b40986bd45f873c7c8a11020fd6389 100644 GIT binary patch delta 5009 zcma)AdvH|M8Q-(7BpWso64)ecl1&ICOGpBN5D=0OB)lIX?<|kyCVO|YvMY?8a75t>YX zd+xdCdz|n0ecw5o&o8hqFEaZ|yWM8MAJes&+dq5J4o3DJoHRNQ`Q#Xv2ZNF-`&>go zMU8r;h!jdFLB$&l`D|G=uJjc?c_1F3Nhzet97P5sB{(=P;!>k7RoX4PB+jLT%O|Ol zD;QB!S@OA}ewRNOl4FuOL<+dBg|ol7=5Obtkb~6uWIp` zN7&u0->_$IpCM9@YfY#llCY5uxNLW@z3_!S0dh`Rk!Dg<&Wq8M+vv$qWK|7D0-8zU z0XUhHKlKPzfI_SCLsL;w`jj1wkvEtjM#_^Ly~~{2jXU44to7Uyk<22327;9YLfLJ=W))b7rxVFb)6cTXDtaaMBAglDkd`&*mHmEsP*vPygUplG zzrb%C($+}?_$qu$u_T4_2^J946D&l~GDg+$GMW-lP9t*jD~K07uu^Ch4o~!Dg6hR2 z(@3y{U@3x@85#8zT4(38Z=k2}V-E$JFGsj(#D(K2>QX_P!~|bW>Q)e>sGyMk8%`Cy z{Qt2kY}|m=TzFyTPUrWAb<jtU_4nT)go6mhziWZ$b@!fJ@UI$v-;d%r%jIEo0Cd zlX)SSc z^vu2^<=%Bwm@clzlnPK#6hMmdVBVbb-8xMfTzD%gS?_qlE#0HZxe|pv8CMbLsXTKd zu5`^e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BUfB4R>uTt&}-t zgIENA$Ua1Ht6RoL{{d;a BKobA} 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":