예제 #1
0
        public void cntk_elementwise_multiplication()
        {
            using (var K = new CNTKBackend())
            {
                #region doc_mul
                double[,] a = Matrix.Magic(5);
                double[,] b = Matrix.Identity(5);
                Tensor tb   = K.constant(b);
                var    kvar = K.mul(a, tb);
                #endregion

                double[,] actual   = (double[, ])kvar.eval();
                double[,] expected = Elementwise.Multiply(a, b);

                AssertEx.AreEqual(actual, expected);
            }
        }