Пример #1
0
 /// <summary>
 /// Call to process a single value.
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public float[][,] CalculateInput(NetworkInput input)
 {
     if (inputQueue.Count == 0)  // & Config.learningEnabled == false) {
     {
         inputQueue.Enqueue(input);
         var output = CalculateInput();
         return(output);
     }
     else
     {
         throw new IllegalCallException("CalculateInput is not valid during learning or if a input is already in Queue. " +
                                        "Please restart the network to use this operation.");
     }
 }
Пример #2
0
 /// <summary>
 /// Add an input to the queue for async calculating.
 /// </summary>
 /// <param name="input"></param>
 public void AddInput(NetworkInput input)
 {
     inputQueue.Enqueue(input);
 }