1 //Create a BatchNormOptions object with the default parameters 2 auto opts = new BatchNormOptions() 3 .gammaInit(constantInit(1.0f)) 4 .betaInit(constantInit(0.0f)) 5 .gammaProj(null) 6 .gammaProj(null) 7 .gammaDecay(0.0f) 8 .momentum(0.9f); 9 10 //Options can also be read back again later 11 assert(opts.gammaDecay == 0.0f); 12 assert(opts.momentum == 0.9f);
Encapsulates additional options for batchnorm layers.