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5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  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"