@Test
public void testRandomInitialize() {

    NinjaMatrix w1 = new NinjaMatrix(25, 401);
    NinjaMatrix w2 = new NinjaMatrix(10, 26);
    Network net = new Network(w1, w2);
    net.randomInitialize();
    double epsilon = Math.sqrt(6) / Math.sqrt(400 + 25);
    NinjaMatrix m = net.getWeightMatrix(0);
    for (int i = 0; i < m.numRows(); i++) {
        for (int j = 0; j < m.numCols(); j++) {
            double weight = m.get(i, j);
            assertTrue(-epsilon <= weight && weight <= epsilon);
        }
    }
    epsilon = Math.sqrt(6) / Math.sqrt(25 + 10);
    m = net.getWeightMatrix(1);
    for (int i = 0; i < m.numRows(); i++) {
        for (int j = 0; j < m.numCols(); j++) {
            double weight = m.get(i, j);
            assertTrue(-epsilon <= weight && weight <= epsilon);
        }
    }
}