예제 #1
0
 public override void VanishConfig()
 {
     Config.Remove(Const.Param.InputNeuronsCount);
     Config.Remove(Const.Param.Neurons);
     CtlInitial0.Vanish(Config);
     CtlInitial1.Vanish(Config);
     CtlActivationFuncParamA.Vanish(Config);
     Config.Remove(Const.Param.ActivationFunc);
     Range.ForEach(GetNeuronsControls(), n => n.VanishConfig());
 }
예제 #2
0
        private void LoadConfig()
        {
            ActivationFunction.Helper.FillComboBox(CtlActivationFunc, Config, Const.Param.ActivationFunc, nameof(ActivationFunction.None));
            CtlInitial0.Load(Config);
            CtlInitial1.Load(Config);
            CtlActivationFuncParamA.Load(Config);

            var neurons = Config.GetArray(Const.Param.Neurons);

            Range.ForEach(neurons, n => AddBias(n));
        }
예제 #3
0
        public override void SaveConfig()
        {
            Config.Set(Const.Param.ActivationFunc, CtlActivationFunc.SelectedItem.ToString());
            CtlInitial0.Save(Config);
            CtlInitial1.Save(Config);
            CtlActivationFuncParamA.Save(Config);

            var neurons = GetNeuronsControls().Where(n => n.IsBias);

            Config.Set(Const.Param.Neurons, neurons.Select(n => n.Id));
            Range.ForEach(neurons, n => n.SaveConfig());
        }
예제 #4
0
        public override bool IsValid()
        {
            bool result = CtlInitial0.IsValid() && CtlInitial1.IsValid() && CtlActivationFuncParamA.IsValid();

            return(result &= GetNeuronsControls().All(n => n.IsValid()));
        }