Example #1
0
            public void GetWeightBias()
            {
                Assert.AreEqual(0, Net.GetBias(0), float.Epsilon);
                Assert.AreNotEqual(0, Net.GetBias(1), float.Epsilon);
                Assert.AreNotEqual(0, Net.GetBias(2), float.Epsilon);
                Assert.AreNotEqual(0, Net.GetBias(3), float.Epsilon);


                Assert.AreEqual(0, Net.GetWeight(0, 0), float.Epsilon);
                Assert.AreEqual(0, Net.GetWeight(0, 1), float.Epsilon);
                Assert.AreNotEqual(0, Net.GetWeight(0, 2), float.Epsilon);
                Assert.AreNotEqual(0, Net.GetWeight(0, 3), float.Epsilon);

                Assert.AreEqual(0, Net.GetWeight(1, 0), float.Epsilon);
                Assert.AreEqual(0, Net.GetWeight(1, 1), float.Epsilon);
                Assert.AreEqual(0, Net.GetWeight(1, 2), float.Epsilon);
                Assert.AreEqual(0, Net.GetWeight(1, 3), float.Epsilon);

                Assert.AreEqual(0, Net.GetWeight(2, 0), float.Epsilon);
                Assert.AreNotEqual(0, Net.GetWeight(2, 1), float.Epsilon);
                Assert.AreEqual(0, Net.GetWeight(2, 2), float.Epsilon);
                Assert.AreEqual(0, Net.GetWeight(2, 3), float.Epsilon);

                Assert.AreEqual(0, Net.GetWeight(3, 0), float.Epsilon);
                Assert.AreNotEqual(0, Net.GetWeight(3, 1), float.Epsilon);
                Assert.AreEqual(0, Net.GetWeight(3, 2), float.Epsilon);
                Assert.AreEqual(0, Net.GetWeight(3, 3), float.Epsilon);
            }