Warning, /geant4/examples/extended/parameterisations/Par04/examplePar04_onnx_vae.mac is written in an unsupported language. File is not indexed.
0001 # examplePar04_onnx_vae.mac
0002 #
0003 /control/execute common_settings_highgran.mac
0004 # Initialize
0005 /run/initialize
0006
0007 /control/execute common_settings_postInit.mac
0008
0009 # Inference Setup
0010 ## dimension of the latent vector (encoded vector in a Variational Autoencoder model)
0011 /Par04/inference/setSizeLatentVector 10
0012 ## size of the condition vector (energy, angle and geometry)
0013 /Par04/inference/setSizeConditionVector 4
0014 ## path to the model which is set to download by cmake
0015 /Par04/inference/setModelPathName MLModels/Generator.onnx
0016 ## Set ML model to use (VAE, CaloDiT-2)
0017 /Par04/inference/setModelType VAE
0018 /Par04/inference/setProfileFlag 0
0019 /Par04/inference/setOptimizationFlag 0
0020 ## cuda flag
0021 /Par04/inference/setCudaFlag 0
0022 /Par04/inference/setInferenceLibrary ONNX
0023 ## set mesh size for inference == mesh size of a full sim that
0024 ## was used for training; it coincides with readout mesh size
0025 /Par04/inference/setSizeOfRhoCells 2.325 mm
0026 /Par04/inference/setSizeOfZCells 3.4 mm
0027 /Par04/inference/setNbOfRhoCells 18
0028 /Par04/inference/setNbOfPhiCells 50
0029 /Par04/inference/setNbOfZCells 45
0030
0031 # cuda options
0032 /Par04/inference/cuda/setDeviceId 0
0033 /Par04/inference/cuda/setGpuMemLimit 2147483648
0034 /Par04/inference/cuda/setArenaExtendedStrategy kSameAsRequested
0035 /Par04/inference/cuda/setCudnnConvAlgoSearch DEFAULT
0036 /Par04/inference/cuda/setDoCopyInDefaultStream 1
0037 /Par04/inference/cuda/setCudnnConvUseMaxWorkspace 1
0038
0039 # Fast Simulation
0040 /analysis/setFileName 10GeV_100events_vae_onnx.root
0041 ## dynamically set readout mesh from particle direction
0042 ## needs to be the first fast sim model!
0043 /param/ActivateModel defineMesh
0044 ## ML fast sim, configured with the inference setup /Par04/inference
0045 /param/ActivateModel inferenceModel
0046 /run/beamOn 100