コード例 #1
0
ファイル: Activation.cs プロジェクト: n1arash/Vortex
        public void IdentityPrimeTest()
        {
            var a = new Matrix(2, 2);

            a.InRandomize();
            var b = a.Duplicate();

            a = new IdentityKernel().Backward(a);
            b.InMap((x) => 1);
            Assert.IsTrue(a == b, "Identity Derivative successful");
        }
コード例 #2
0
ファイル: Activation.cs プロジェクト: n1arash/Vortex
        public void IdentityTest()
        {
            var a = new Matrix(2, 2);

            a.InRandomize();
            var b = a.Duplicate();

            a = new IdentityKernel().Forward(a);
            b.InMap((x) => x);
            Assert.IsTrue(a == b, "Identity Activation successful");
        }