Beispiel #1
0
        public void Cosh_()
        {
            float[] data1  = { 0.4f, 0.5f, 0.3f, -0.1f };
            int[]   shape1 = { 4 };
            var     tensor = new FloatTensor(data1, shape1);

            float[] data2              = { 1.08107237f, 1.12762597f, 1.04533851f, 1.00500417f };
            int[]   shape2             = { 4 };
            var     expectedCoshTensor = new FloatTensor(data2, shape2);

            tensor.Cosh_();

            for (int i = 2; i < tensor.Size; i++)
            {
                Assert.AreEqual(expectedCoshTensor.Data[i], tensor.Data[i]);
            }
        }