Example #1
0
        private static float[] ExpectedOutput(int size)
        {
            var result = new float[size * size];

            for (int i = 0; i < size; i++)
            {
                var oneHot = CNTKHelper.OneHot(i, size);
                for (int j = 0; j < size; j++)
                {
                    result[i * size + j] = oneHot[j];
                }
            }
            return(result);
        }
Example #2
0
        private static float[] OneHotImages(int size)
        {
            var result = new float[size * size * size];

            for (int k = 0; k < size; k++)
            {
                var oneHot = CNTKHelper.OneHot(k, size);
                for (int i = 0; i < size; i++)
                {
                    for (int j = 0; j < size; j++)
                    {
                        result[k * size * size + i * size + j] = oneHot[i];
                    }
                }
            }
            return(result);
        }