hylee commited on
Commit
1c1d3dc
1 Parent(s): 4e16140
Files changed (2) hide show
  1. APDrawingGAN2/models/networks.py +0 -4
  2. app.py +2 -2
APDrawingGAN2/models/networks.py CHANGED
@@ -63,10 +63,6 @@ def init_weights(net, init_type='normal', gain=0.02):
63
 
64
 
65
  def init_net(net, init_type='normal', init_gain=0.02, gpu_ids=[]):
66
- if len(gpu_ids) > 0:
67
- assert(torch.cuda.is_available())
68
- net.to(gpu_ids[0])
69
- net = torch.nn.DataParallel(net, gpu_ids)
70
  init_weights(net, init_type, gain=init_gain)
71
  return net
72
 
 
63
 
64
 
65
  def init_net(net, init_type='normal', init_gain=0.02, gpu_ids=[]):
 
 
 
 
66
  init_weights(net, init_type, gain=init_gain)
67
  return net
68
 
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 = '-1'
171
- opt.gpu_ids_p = '-1'
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 = ''
171
+ opt.gpu_ids_p = ''
172
  opt.imagefolder = 'images-single'
173
 
174
  opt.checkpoints_dir = checkpoint_dir