4 from ROOT
import Belle2
9 Example script showing how to train neural networks
10 to be used with the CDCTriggerNeuroModule.
12 This script uses realistic values for the amount of training data
13 and the number of runs, so it will run a long time.
21 basf2.set_random_seed(1)
28 mlpname =
'GRLNeuro.root'
29 trainname =
'GRLNeuroTraindata.root'
30 logname =
'GRLNeuroLog'
40 main = basf2.create_path()
42 main.add_module(
'Progress')
43 main.add_module(
'RootInput')
49 main.add_module(
'GRLNeuroTrainer',
51 filename=os.path.join(mlpdir, mlpname),
52 trainFilename=os.path.join(traindir, trainname),
65 i_cdc_sector=[0*2+36*3, 0*2+36*3, 0*2+36*3, 0*2+36*3, 0*2+36*3, 0*2+36*3, 0*2+36*3, 0*2+36*3],
66 i_ecl_sector=[0*3, 1*3, 2*3, 3*3, 4*3, 5*3, 6*3, 7*3],
85 logLevel=basf2.LogLevel.DEBUG,
96 print(basf2.statistics)