public double[] Run(SoundSnippet song) { if (File.Exists(Environment.CurrentDirectory + @"\" + networkPath)) { network = Network.Load(networkPath); } else { network = new ActivationNetwork(new SigmoidFunction(2), 6, 6, 4, 4); } song.FromFile(); return(network.Compute(song.Dataset)); }
static void Main(string[] args) { MusicNetwork network = null; Console.WriteLine("What network do you wanna run?"); switch (Console.ReadLine().ToLower()) { case "xor": XOR.RunXOR(args); break; case "sound": RunSound(network); break; } SoundSnippet soundSnippet = new SoundSnippet("Blue Moon"); soundSnippet.FromFile(); Console.ReadKey(); }