hvoss-techfak commited on
Commit
9c17e21
·
1 Parent(s): 06da54a
Files changed (1) hide show
  1. auto_forge.py +3 -3
auto_forge.py CHANGED
@@ -904,7 +904,7 @@ def start(args) -> float:
904
  print("Error: No CSV or JSON file given. Please provide one of them.")
905
  sys.exit(1)
906
 
907
- device = get_device(args)
908
 
909
  os.makedirs(args.output_folder, exist_ok=True)
910
 
@@ -1000,7 +1000,7 @@ def start(args) -> float:
1000
  )
1001
 
1002
  # Run optimization loop
1003
- _run_optimization_loop(optimizer, args, device)
1004
 
1005
  # Post-process, prune, and export outputs
1006
  final_loss = _post_optimize_and_export(
@@ -1014,7 +1014,7 @@ def start(args) -> float:
1014
  material_TDs_np,
1015
  material_names,
1016
  bgr_tuple,
1017
- device,
1018
  focus_map_full,
1019
  focus_map_proc,
1020
  )
 
904
  print("Error: No CSV or JSON file given. Please provide one of them.")
905
  sys.exit(1)
906
 
907
+ device = torch.device("cpu")
908
 
909
  os.makedirs(args.output_folder, exist_ok=True)
910
 
 
1000
  )
1001
 
1002
  # Run optimization loop
1003
+ _run_optimization_loop(optimizer, args, torch.device("cuda"))
1004
 
1005
  # Post-process, prune, and export outputs
1006
  final_loss = _post_optimize_and_export(
 
1014
  material_TDs_np,
1015
  material_names,
1016
  bgr_tuple,
1017
+ torch.device("cuda"),
1018
  focus_map_full,
1019
  focus_map_proc,
1020
  )