jpdefrutos commited on
Commit
67a11d3
·
1 Parent(s): f915f2e

# threads is automatically set using os.cpu_count()

Browse files
Files changed (1) hide show
  1. SoA_methods/eval_ants.py +1 -1
SoA_methods/eval_ants.py CHANGED
@@ -83,7 +83,7 @@ if __name__ == '__main__':
83
  sess = tf.Session(config=config)
84
  tf.keras.backend.set_session(sess)
85
  ####
86
- os.environ["ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS"] = "12" #https://github.com/ANTsX/ANTsPy/issues/261
87
  print("Running ANTs using {} threads".format(os.environ.get("ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS")))
88
  dm_interp = DisplacementMapInterpolator(image_shape, 'griddata')
89
  # Header of the metrics csv file
 
83
  sess = tf.Session(config=config)
84
  tf.keras.backend.set_session(sess)
85
  ####
86
+ os.environ["ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS"] = "{:d}".format(os.cpu_count()) #https://github.com/ANTsX/ANTsPy/issues/261
87
  print("Running ANTs using {} threads".format(os.environ.get("ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS")))
88
  dm_interp = DisplacementMapInterpolator(image_shape, 'griddata')
89
  # Header of the metrics csv file