예제 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello from the MADELINE Netrowk!");
            try
            {
                var network     = new Network(@"../../../Letters");
                var samplesPath = Directory.EnumerateFiles(@"../../../Samples", "*.txt").ToArray();

                foreach (var samplePath in samplesPath)
                {
                    Console.WriteLine("==========================================");
                    Console.WriteLine("Processing " + samplePath);
                    Console.WriteLine("==========================================");

                    var sampleArray = LetterExtensions.ReadLetterFromFile(samplePath);
                    network.Process(sampleArray);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }

            Console.Read();
        }
예제 #2
0
 public Neuron(string filePath)
 {
     Letter  = Path.GetFileNameWithoutExtension(filePath);
     Weights = LetterExtensions.ReadLetterFromFile(filePath);
     VectorExtensions.NormalizeVector(Weights);
     Console.WriteLine("Wczytano szablon litery " + filePath);
 }