Geant4 Cross Reference |
1 from utils.optimizer import OptimizerType 2 3 """ 4 Experiment constants. 5 """ 6 # Number of calorimeter layers (z-axis segmentation). 7 N_CELLS_Z = 45 8 # Segmentation in the r,phi direction. 9 N_CELLS_R = 18 10 N_CELLS_PHI = 50 11 # Cell size in the r and z directions 12 SIZE_R = 2.325 13 SIZE_Z = 3.4 14 15 # Minimum and maximum primary particle energy to consider for training in GeV units. 16 MIN_ENERGY = 1 17 MAX_ENERGY = 1024 18 # Minimum and maximum primary particle angle to consider for training in degrees units. 19 MIN_ANGLE = 50 20 MAX_ANGLE = 90 21 22 """ 23 Directories. 24 """ 25 # Directory to load the full simulation dataset. 26 INIT_DIR = "./dataset/" 27 # Directory to save VAE checkpoints 28 GLOBAL_CHECKPOINT_DIR = "./checkpoint" 29 # Directory to save model after conversion to a format that can be used in C++. 30 CONV_DIR = "./conversion" 31 # Directory to save validation plots. 32 VALID_DIR = "./validation" 33 # Directory to save VAE generated showers. 34 GEN_DIR = "./generation" 35 36 """ 37 Model default parameters. 38 """ 39 BATCH_SIZE_PER_REPLICA = 128 40 # Total number of readout cells (represents the number of nodes in the input/output layers of the model). 41 ORIGINAL_DIM = N_CELLS_Z * N_CELLS_R * N_CELLS_PHI 42 INTERMEDIATE_DIMS = [100, 50, 20, 14] 43 LATENT_DIM = 10 44 EPOCHS = 1000 45 LEARNING_RATE = 0.001 46 ACTIVATION = "leaky_relu" 47 OUT_ACTIVATION = "sigmoid" 48 VALIDATION_SPLIT = 0.10 49 NUMBER_OF_K_FOLD_SPLITS = 1 50 OPTIMIZER_TYPE = OptimizerType.ADAM 51 KERNEL_INITIALIZER = "RandomNormal" 52 BIAS_INITIALIZER = "Zeros" 53 EARLY_STOP = False 54 SAVE_BEST_MODEL = True 55 SAVE_MODEL_EVERY_EPOCH = True 56 PATIENCE = 10 57 MIN_DELTA = 0.01 58 BEST_MODEL_FILENAME = "VAE_best" 59 # GPU identifiers separated by comma, no spaces. 60 GPU_IDS = "0" 61 # Maximum allowed memory on one of the GPUs (in GB) 62 MAX_GPU_MEMORY_ALLOCATION = 32 63 # Buffer size used while shuffling the dataset. 64 BUFFER_SIZE = 1000 65 66 """ 67 Optimizer parameters. 68 """ 69 N_TRIALS = 50 70 # Maximum size of a hidden layer 71 MAX_HIDDEN_LAYER_DIM = 2000 72 73 """ 74 Validator parameter. 75 """ 76 FULL_SIM_HISTOGRAM_COLOR = "blue" 77 ML_SIM_HISTOGRAM_COLOR = "red" 78 FULL_SIM_GAUSSIAN_COLOR = "green" 79 ML_SIM_GAUSSIAN_COLOR = "orange" 80 HISTOGRAM_TYPE = "step" 81 82 """ 83 W&B parameters. 84 """ 85 # Change this to your entity name. 86 WANDB_ENTITY = "entity-name"