diff --git a/src/main/java/FCLayer.java b/src/main/java/FCLayer.java index 038d7a9..8f646a7 100644 --- a/src/main/java/FCLayer.java +++ b/src/main/java/FCLayer.java @@ -14,11 +14,8 @@ public class FCLayer extends Layer { } private void initialize(int inputSize) { - Random random = new Random(); - this.weights = new SimpleMatrix(inputSize, numNeurons, true, - random.doubles((long) inputSize*numNeurons, -1, 1).toArray()); - this.biases = new SimpleMatrix(1, numNeurons, true, - random.doubles(numNeurons, -1, 1).toArray()); + this.weights = Utilities.gaussianMatrix(inputSize, numNeurons, 0, 1, 0.1d); + this.biases = Utilities.ones(1, numNeurons); this.isInitialized = true; }