45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| import numpy as np
 | |
| 
 | |
| DATA_DIR = "../data"
 | |
| OUT_DIR = "./out"
 | |
| MODEL_DIR = "./models"
 | |
| 
 | |
| NB_THREADS = 1024
 | |
| NB_THREADS_2D = (32, 32)
 | |
| NB_THREADS_3D = (16, 16, 4)
 | |
| M = int(np.log2(NB_THREADS_2D[1]))
 | |
| 
 | |
| # Save state to avoid recalculation on restart
 | |
| SAVE_STATE = True
 | |
| # Redo the state even if it's already saved
 | |
| FORCE_REDO = False
 | |
| # Use NJIT to greatly accelerate runtime
 | |
| COMPILE_WITH_C = True
 | |
| # Use GPU to greatly accelerate runtime (as priority over NJIT)
 | |
| GPU_BOOSTED = True
 | |
| # Depending on what you set, the output label will be as follow :
 | |
| # | COMPILE_WITH_C | GPU_BOOSTED | LABEL |
 | |
| # |----------------|-------------|-------|
 | |
| # | True           | True        | GPU   |
 | |
| # | True           | False       | CPU   |
 | |
| # | False          | True        | PGPU  |
 | |
| # | False          | False       | PY    |
 | |
| 
 | |
| # Number of weak classifiers
 | |
| # TS = [1]
 | |
| # TS = [1, 5, 10]
 | |
| TS = [1, 5, 10, 25, 50]
 | |
| # TS = [1, 5, 10, 25, 50, 100, 200]
 | |
| # TS = [1, 5, 10, 25, 50, 100, 200, 300]
 | |
| # TS = [1, 5, 10, 25, 50, 100, 200, 300, 400, 500, 1000]
 | |
| 
 | |
| # Enable verbose output (for debugging purposes)
 | |
| __DEBUG = False
 | |
| # Debugging options
 | |
| if __DEBUG:
 | |
| 	IDX_INSPECT = 4548
 | |
| 	IDX_INSPECT_OFFSET = 100
 | |
| 	np.seterr(all = 'raise')
 | |
| 	# Debug option (image width * log_10(length) + extra characters)
 | |
| 	np.set_printoptions(linewidth = 19 * 6 + 3)
 |