private static void ValidateIfHasInputs(IndexedLayer layer)
 {
     if (layer.Layer.InputConnections.Count == 0) throw new ArgumentException(string.Format("Layer {0} hasn't got input connections.", layer.Index), "layer");
 }
 private static void ValidateIfHasNotInputs(IndexedLayer layer)
 {
     if (layer.Layer.InputConnections.Count != 0) throw new ArgumentException(string.Format("Layer {0} has input connections which is not allowed.", layer.Index), "layer");
 }
 private void ValidateOutputLayer(IndexedLayer layer)
 {
     ValidateIfHasInputs(layer);
     ValidateIfHasNotOutput(layer);
 }