Пример #1
0
 public void Finish()
 {
     if (!LoggingInProgress)
     {
         throw new Exception("There is no logging in progress.");
     }
     LoggingInProgress = false;
     EndTime           = DateTime.Now;
     CurrentLogItem.TrainingTimeInMilliseconds = (EndTime - StartTime).TotalMilliseconds;
     LogItems.Add(CurrentLogItem);
     CurrentLogItem = null;
     WriteToLogFile();
 }
Пример #2
0
 public void Start(int trainingSize, int testingSize, int epochs, double lambda, int hiddenNeurons, string function)
 {
     if (LoggingInProgress)
     {
         throw new Exception("There is already logging in progress.");
     }
     CurrentLogItem = new ANNLogItem
     {
         TrainingSetSize       = trainingSize,
         TestSetSize           = testingSize,
         NumberOfEpochs        = epochs,
         Lambda                = lambda,
         NumberOfHiddenNeurons = hiddenNeurons,
         Function              = function
     };
     StartTime         = DateTime.Now;
     LoggingInProgress = true;
 }