1 //Create a DenseOptions object with the default parameters 2 auto opts = new DenseOptions() 3 .weightInit(heGaussianInit()) 4 .biasInit(constantInit(0.0f)) 5 .weightProj(null) 6 .biasProj(null) 7 .weightDecay(0.0f) 8 .useBias(true); 9 10 //Options can also be read back again later 11 assert(opts.weightDecay == 0.0f); 12 assert(opts.useBias == true);
Encapsulates additional options for dense layers.