File tree Expand file tree Collapse file tree
src/main/java/org/encog/neural/networks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929import org .encog .engine .network .activation .ActivationFunction ;
3030import org .encog .engine .network .activation .ActivationSigmoid ;
3131import org .encog .engine .network .activation .ActivationTANH ;
32+ import org .encog .mathutil .randomize .ConsistentRandomizer ;
3233import org .encog .mathutil .randomize .NguyenWidrowRandomizer ;
3334import org .encog .mathutil .randomize .Randomizer ;
3435import org .encog .mathutil .randomize .RangeRandomizer ;
@@ -619,16 +620,12 @@ public void reset() {
619620
620621 /**
621622 * Reset the weight matrix and the bias values. This will use a
622- * Nguyen-Widrow randomizer with a range between -1 and 1. If the network
623- * does not have an input, output or hidden layers, then Nguyen-Widrow
624- * cannot be used and a simple range randomize between -1 and 1 will be
625- * used. Use the specified seed.
623+ * RangeRandomizer with a range between -1 and 1.
626624 *
627625 */
628626 @ Override
629627 public void reset (final int seed ) {
630- Randomizer randomizer = getRandomizer ();
631- randomizer .randomize (this );
628+ (new ConsistentRandomizer (-1 ,1 ,seed )).randomize (this );
632629 }
633630
634631 /**
You can’t perform that action at this time.
0 commit comments