init
Browse files- APDrawingGAN2/options/base_options.py +2 -2
- app.py +2 -2
APDrawingGAN2/options/base_options.py
CHANGED
@@ -178,7 +178,7 @@ class BaseOptions():
|
|
178 |
if id >= 0:
|
179 |
opt.gpu_ids.append(id)
|
180 |
if len(opt.gpu_ids) > 0:
|
181 |
-
torch.cuda.set_device(opt.gpu_ids[0])
|
182 |
|
183 |
# set gpu ids
|
184 |
str_ids = opt.gpu_ids_p.split(',')
|
@@ -186,7 +186,7 @@ class BaseOptions():
|
|
186 |
for str_id in str_ids:
|
187 |
id = int(str_id)
|
188 |
if id >= 0:
|
189 |
-
opt.gpu_ids_p.append(id)
|
190 |
|
191 |
self.opt = opt
|
192 |
return self.opt
|
|
|
178 |
if id >= 0:
|
179 |
opt.gpu_ids.append(id)
|
180 |
if len(opt.gpu_ids) > 0:
|
181 |
+
#torch.cuda.set_device(opt.gpu_ids[0])
|
182 |
|
183 |
# set gpu ids
|
184 |
str_ids = opt.gpu_ids_p.split(',')
|
|
|
186 |
for str_id in str_ids:
|
187 |
id = int(str_id)
|
188 |
if id >= 0:
|
189 |
+
#opt.gpu_ids_p.append(id)
|
190 |
|
191 |
self.opt = opt
|
192 |
return self.opt
|
app.py
CHANGED
@@ -167,8 +167,8 @@ def main():
|
|
167 |
opt.netG = 'resnet_9blocks'
|
168 |
opt.which_epoch = 150
|
169 |
opt.how_many = 1000
|
170 |
-
opt.gpu_ids = ''
|
171 |
-
opt.gpu_ids_p = ''
|
172 |
opt.imagefolder = 'images-single'
|
173 |
|
174 |
opt.checkpoints_dir = checkpoint_dir
|
|
|
167 |
opt.netG = 'resnet_9blocks'
|
168 |
opt.which_epoch = 150
|
169 |
opt.how_many = 1000
|
170 |
+
opt.gpu_ids = '-1'
|
171 |
+
opt.gpu_ids_p = '-1'
|
172 |
opt.imagefolder = 'images-single'
|
173 |
|
174 |
opt.checkpoints_dir = checkpoint_dir
|