private double Random(double fanIn) { if (configuration.WeightInitialisationMethod == RandomType.Linear) { return((configuration.NextRandom() - 0.5) * (4.8 / fanIn) * configuration.WeightInitialisationSize); } else if (configuration.WeightInitialisationMethod == RandomType.Guassian) { return(RandomNormal() * configuration.WeightInitialisationSize); } else { throw new NotImplementedException(); } }