From 27c2f5b9a24ab35eb5bf192ee9b7691a9eddd69f Mon Sep 17 00:00:00 2001 From: Bo Pang Date: Sat, 12 Jun 2021 02:35:25 -0700 Subject: [PATCH] . --- syntheic_8gaussian.py | 2 +- syntheic_pinwell.py | 4 ++-- synthetic_8gaussian.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/syntheic_8gaussian.py b/syntheic_8gaussian.py index 91c7633..ab1b4d9 100644 --- a/syntheic_8gaussian.py +++ b/syntheic_8gaussian.py @@ -388,7 +388,7 @@ def main(): args = parser.parse_args() set_seed(args.seed) set_gpu(args.gpu) - device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') + device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') model = IBEBM(args) model.to(device) diff --git a/syntheic_pinwell.py b/syntheic_pinwell.py index ac3fd25..4d52430 100644 --- a/syntheic_pinwell.py +++ b/syntheic_pinwell.py @@ -372,7 +372,7 @@ def main(): parser.add_argument('--batch_size', type=int, default=500) parser.add_argument('--log_freq', type=int, default=100) parser.add_argument('--viz_freq', type=int, default=1000) - parser.add_argument('--gpu', type=int, default=1) + parser.add_argument('--gpu', type=int, default=0) parser.add_argument('--x_dim', type=int, default=2) parser.add_argument('--dec_hidden', type=int, default=200) parser.add_argument('--enc_hidden', type=int, default=200) @@ -398,7 +398,7 @@ def main(): args = parser.parse_args() set_seed(args.seed) set_gpu(args.gpu) - device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') + device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') model = IBEBM(args) model.to(device) diff --git a/synthetic_8gaussian.py b/synthetic_8gaussian.py index 91c7633..ab1b4d9 100644 --- a/synthetic_8gaussian.py +++ b/synthetic_8gaussian.py @@ -388,7 +388,7 @@ def main(): args = parser.parse_args() set_seed(args.seed) set_gpu(args.gpu) - device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') + device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') model = IBEBM(args) model.to(device)