Owos commited on
Commit
9c98c9b
·
1 Parent(s): 2f3d603

Update neural_style.py

Browse files
Files changed (1) hide show
  1. neural_style.py +4 -4
neural_style.py CHANGED
@@ -59,7 +59,7 @@ class TransferParams():
59
  style_blend_weights = None
60
  content_image = 'examples/inputs/tubingen.jpg'
61
  image_size = 300
62
- gpu = 0# "c"
63
  content_weight = 5e0
64
  style_weight = 1e2
65
  normalize_weights = False
@@ -353,9 +353,9 @@ def setup_gpu():
353
  setup_cuda()
354
  dtype = torch.FloatTensor
355
 
356
- elif "c" not in str(params.gpu).lower():
357
- setup_cuda()
358
- dtype, backward_device = torch.cuda.FloatTensor, "cuda:" + str(params.gpu)
359
  else:
360
  setup_cpu()
361
  dtype, backward_device = torch.FloatTensor, "cpu"
 
59
  style_blend_weights = None
60
  content_image = 'examples/inputs/tubingen.jpg'
61
  image_size = 300
62
+ gpu = "c" #0
63
  content_weight = 5e0
64
  style_weight = 1e2
65
  normalize_weights = False
 
353
  setup_cuda()
354
  dtype = torch.FloatTensor
355
 
356
+ #elif "c" not in str(params.gpu).lower():
357
+ #setup_cuda()
358
+ #dtype, backward_device = torch.cuda.FloatTensor, "cuda:" + str(params.gpu)
359
  else:
360
  setup_cpu()
361
  dtype, backward_device = torch.FloatTensor, "cpu"