Beispiel #1
0
        public void SingleLineReader()
        {
            var readerLayer = new BatchReader()
            {
                FileName            = MNIST,
                SparseFormat        = true,
                NormalizationFactor = 1.0 / 256.0,
                Scale    = 16.0,
                MaxSlots = 1
            };

            var singleLineReader = new LLSingleLineReader()
            {
                FileName            = MNIST,
                SparseFormat        = true,
                NormalizationFactor = 1.0 / 256.0,
                Scale = 16.0,
            };
            var read = readerLayer.GetNext().Decrypt(null);
            var pad  = singleLineReader.GetNext().Decrypt(null);

            Assert.AreEqual(28 * 28, pad.RowCount);
            for (int i = 0; i < 28; i++)
            {
                for (int j = 0; j < 28; j++)
                {
                    Assert.AreEqual(read[0, i * 28 + j], pad[i * 28 + j, 0]);
                }
            }
        }