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] [ 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 ]

Diff markup

Differences between /examples/extended/parameterisations/Par04/training/README.md (Version 11.3.0) and /examples/extended/parameterisations/Par04/training/README.md (Version 6.1)


  1 This repository contains the set of scripts us    
  2 in this example.                                  
  3                                                   
  4 - root2h5.py: translation of ROOT file with sh    
  5 - core/constants.py: defines the set of common    
  6 - core/model.py: defines the VAE model class a    
  7 - utils/preprocess.py: defines the data loadin    
  8 - utils/hyperparameter_tuner.py: defines the H    
  9 - utils/gpu_limiter.py: defines a logic respon    
 10 - utils/observables.py: defines a set of obser    
 11 - utils/plotter.py: defines plotting classes r    
 12 - train.py: performs model training.              
 13 - generate.py: generate showers using a saved     
 14 - observables.py: defines a set of shower obse    
 15 - validate.py: creates validation plots using     
 16 - convert.py: defines the conversion function     
 17 - tune_model.py: performs hyperparameters opti    
 18                                                   
 19 ## Getting Started                                
 20                                                   
 21 `setup.py` script creates necessary folders us    
 22                                                   
 23 ```                                               
 24 python3 setup.py                                  
 25 ```                                               
 26                                                   
 27 ## Full simulation dataset                        
 28                                                   
 29 The full simulation dataset can be downloaded     
 30                                                   
 31 If custom simulation is used, the output of fu    
 32                                                   
 33 ## Training                                       
 34                                                   
 35 In order to launch the training:                  
 36                                                   
 37 ```                                               
 38 python3 train.py                                  
 39 ```                                               
 40                                                   
 41 You may specify those three following flags. I    
 42                                                   
 43 ```--max-gpu-memory-allocation``` specifies a     
 44 an integer.                                       
 45                                                   
 46 ```--gpu-ids``` specifies IDs of physical GPUs    
 47 If you specify more than one GPU then automati    
 48 training.                                         
 49                                                   
 50 ```--study-name``` specifies a study name. Thi    
 51 directory for saving models.                      
 52                                                   
 53 ## Hyperparameters tuning                         
 54                                                   
 55 If you want to tune hyperparameters, specify i    
 56 parameters: discrete, continuous and categoric    
 57 the categorical parameter requires a list of p    
 58                                                   
 59 ```                                               
 60 python3 tune_model.py                             
 61 ```                                               
 62                                                   
 63 If you want to parallelize tuning process you     
 64 setting `--storage="URL_TO_MYSQL_DATABASE"`. T    
 65                                                   
 66 ```                                               
 67 python3 tune_model.py --storage="URL_TO_MYSQL_    
 68 ```                                               
 69                                                   
 70 Similarly to training procedure, you may speci    
 71 ```--study-name```.                               
 72                                                   
 73 ## ML shower generation (MLFastSim)               
 74                                                   
 75 In order to generate showers using the ML mode    
 76 and angle of the particle and the epoch of the    
 77 specified (by default is set to 10.000):          
 78                                                   
 79 ```                                               
 80 python3 generate.py --geometry=SiW --energy=64    
 81 ```                                               
 82                                                   
 83 If you do not specify an epoch number the base    
 84                                                   
 85 ## Validation                                     
 86                                                   
 87 In order to validate the MLFastSim and the ful    
 88 geometry, energy and angle of the particle:       
 89                                                   
 90 ```                                               
 91 python3 validate.py --geometry=SiW --energye=6    
 92 ```                                               
 93                                                   
 94 ## Conversion                                     
 95                                                   
 96 After training and validation, the model can b    
 97 use `convert.py` script:                          
 98                                                   
 99 ```                                               
100 python3 convert.py --epoch 1000                   
101 ```