init
Browse files- APDrawingGAN2/models/networks.py +0 -4
- 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 = '
|
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 = ''
|
171 |
+
opt.gpu_ids_p = ''
|
172 |
opt.imagefolder = 'images-single'
|
173 |
|
174 |
opt.checkpoints_dir = checkpoint_dir
|