public void DeleteHiddenLayer(LayerViewModel l)
 {
     if (HiddenLayers.Contains(l))
     {
         HiddenLayers.Remove(l);
         for (int i = 0; i < HiddenLayers.Count; i++)
         {
             HiddenLayers[i].Number = i + 1;
         }
     }
     CanCreateChanged?.Invoke();
 }
 public PerceptronParametersViewModel()
 {
     HiddenLayers      = new ObservableCollection <LayerViewModel> ();
     OutputLayer       = new LayerViewModel();
     InputNeuronsCount = 1;
     addLayerHandler   = new ActionHandler(
         () =>
     {
         HiddenLayers.Add(new LayerViewModel(HiddenLayers.Count + 1, DeleteHiddenLayer));
         CanCreateChanged?.Invoke();
     }, o => true);
 }