Exemplo n.º 1
0
        public void TestClone()
        {
            var f = new ActivationFunctions.LeakyRelu(2.3, 3.1);

            Assert.AreEqual(f, f.Clone());
            Assert.AreNotSame(f, f.Clone());
        }
Exemplo n.º 2
0
        public void TestMutate()
        {
            var f = new ActivationFunctions.LeakyRelu(-5, 1);
            var r = MockRandom(.3);

            f.Mutate(r, new FunctionParameters(0, new Parameter(0, 0, .5)));
            Assert.AreEqual(new ActivationFunctions.LeakyRelu(-5.2, .8), f);
        }
Exemplo n.º 3
0
        public void TestPositive()
        {
            var f = new ActivationFunctions.LeakyRelu(2, 3);

            Assert.AreEqual(15, f.GetActivation(5));
        }
Exemplo n.º 4
0
        public void TestNegativeReverse()
        {
            var f = new ActivationFunctions.LeakyRelu(-5, 3);

            Assert.AreEqual(5, f.GetActivation(-1));
        }
Exemplo n.º 5
0
        public void TestNegative()
        {
            var f = new ActivationFunctions.LeakyRelu(2, 3);

            Assert.AreEqual(-8, f.GetActivation(-4));
        }