/// <summary>
 /// Trains the network over a single Training Item
 /// </summary>
 /// <param name="item">The item used to train the network</param>
 /// <param name="then">The action to be executed after the training</param>
 /// <param name="addCostToTotal">Should it add the cost to this generation total?</param>
 public void Train(TrainingItem item, Action then, bool addCostToTotal = false)
 {
     Train(item.inputs, item.outputs, false, addCostToTotal);
     if (then != null)
     {
         then.Invoke();
     }
 }
 /// <summary>
 /// Trains the network over a single Training Item
 /// </summary>
 /// <param name="item">The item used to train the network</param>
 /// <param name="returnCost">Should it return the cost?</param>
 /// <returns>The cost if returnCost is true</returns>
 public double Train(TrainingItem item, bool returnCost = false)
 {
     return(Train(item.inputs, item.outputs, returnCost));
 }