public BackPropNetwork(NetworkProperties props, BackPropProperties backProps, Random rnd) { this.rnd = rnd; // for Shuffle() this.backProps = backProps; this.Network = new NeuralNetwork(props, rnd); // back-prop related arrays below this.hGrads = new double[props.NumHidden]; this.oGrads = new double[props.NumOutput]; this.ihPrevWeightsDelta = NetworkData.MakeMatrix(props.NumInput, props.NumHidden); this.hPrevBiasesDelta = new double[props.NumHidden]; this.hoPrevWeightsDelta = NetworkData.MakeMatrix(props.NumHidden, props.NumOutput); this.oPrevBiasesDelta = new double[props.NumOutput]; }
static INeuralNetwork BuildBackPropNetwork() { var props = new NetworkProperties { InitWeightMin = -0.1, InitWeightMax = 0.1, NumHidden = Globals.gNumHidden, // orig 2 NumInput = Globals.gNumInput, // orig 4 NumOutput = Globals.gNumOutput // orig 3 }; var backProps = new BackPropProperties { learnRate = 0.05, maxEprochs = Globals.gMaxIterations, // orig 2000, momentum = 0.00, weightDecay = 0.000, mseStopCondition = 0.020 }; return new BackPropNetwork(props, backProps, new Random(0)); }
static INeuralNetwork BuildBackPropNetwork() { var props = new NetworkProperties { InitWeightMin = -0.1, InitWeightMax = 0.1, NumHidden = 2, NumInput = 4, NumOutput = 3 }; var backProps = new BackPropProperties { learnRate = 0.05, maxEprochs = 2000, momentum = 0.00, weightDecay = 0.000, mseStopCondition = 0.020 }; return new BackPropNetwork(props, backProps, new Random(0)); }