-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
60 lines (54 loc) · 1.82 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using OnsetDetection.Diagnostics;
using OnsetDetection.NeuralNetworks;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using OnsetDetection.Testing;
namespace OnsetDetection
{
class Program
{
static Queue<NetworkConfiguration> tests;
static void Main(string[] args)
{
NetworkConfiguration configuration = new NetworkConfiguration()
{
DetectionValue = 1.0,
Epochs = 100000,
LearningCoefficient = 0.00001,
Momentum = 0.9,
Name = "",
NoDetectionValue = 0.0,
Seed = 0,
WeightInitialisationMethod = RandomType.Linear,
WeightInitialisationSize = 1.0
};
NetworkEvaluator evaluator = new NetworkEvaluator();
evaluator.Evaluate(configuration);
//tests = new Queue<NetworkConfiguration>(NetworkConfiguration.Read());
//new Thread(TestConfiguration).Start();
//new Thread(TestConfiguration).Start();
//new Thread(TestConfiguration).Start();
//new Thread(TestConfiguration).Start();
Console.ReadLine();
}
static void TestConfiguration()
{
NetworkEvaluator evaluator = new NetworkEvaluator();
while (true)
{
NetworkConfiguration configuration;
lock (tests)
{
if (tests.Count == 0) break;
configuration = tests.Dequeue();
}
Console.WriteLine("[{0}] Starting test of {1}", DateTime.Now, configuration.Name);
evaluator.Evaluate(configuration);
}
}
}
}