antoinedelplace commited on
Commit
5accddc
·
1 Parent(s): 207ef6f

Remove GPU

Browse files
Files changed (2) hide show
  1. asp/models/networks.py +1 -1
  2. main.py +1 -1
asp/models/networks.py CHANGED
@@ -205,7 +205,7 @@ def init_net(net, init_type='normal', init_gain=0.02, gpu_ids=[], debug=False, i
205
 
206
  Return an initialized network.
207
  """
208
- if len(gpu_ids) > 0:
209
  assert(torch.cuda.is_available())
210
  net.to(gpu_ids[0])
211
  # if not amp:
 
205
 
206
  Return an initialized network.
207
  """
208
+ if gpu_ids is not None and len(gpu_ids) > 0:
209
  assert(torch.cuda.is_available())
210
  net.to(gpu_ids[0])
211
  # if not amp:
main.py CHANGED
@@ -21,7 +21,7 @@ def convert_he2ihc(input_he_image_path):
21
  input_img = Image.open(input_he_image_path).convert('RGB')
22
 
23
  opt = SimpleNamespace(
24
- gpu_ids=[0],
25
  isTrain=False,
26
  checkpoints_dir="../../checkpoints",
27
  # name="ASP_pretrained/BCI_her2_lambda_linear",
 
21
  input_img = Image.open(input_he_image_path).convert('RGB')
22
 
23
  opt = SimpleNamespace(
24
+ gpu_ids=None,
25
  isTrain=False,
26
  checkpoints_dir="../../checkpoints",
27
  # name="ASP_pretrained/BCI_her2_lambda_linear",