Пример #1
0
        public void LoadConfig()
        {
            ActivationFunction.Helper.FillComboBox(CtlActivationFunc, Config, Const.Param.ActivationFunc, nameof(ActivationFunction.LogisticSigmoid));
            CtlActivationFuncParamA.Load(Config);

            StateChanged();
        }
Пример #2
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());
 }
Пример #3
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));
        }
Пример #4
0
        public override void VanishConfig()
        {
            Config.Remove(Const.Param.ActivationInitializer);
            Config.Remove(Const.Param.WeightsInitializer);
            Config.Remove(Const.Param.IsBias);
            Config.Remove(Const.Param.IsBiasConnected);
            Config.Remove(Const.Param.ActivationFunc);

            CtlWeightsIniterParamA.Vanish(Config);
            CtlActivationIniterParamA.Vanish(Config);
            CtlActivationFuncParamA.Vanish(Config);
        }
Пример #5
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());
        }
Пример #6
0
        public void LoadConfig()
        {
            InitializeMode.Helper.FillComboBox(CtlWeightsIniter, Config, Const.Param.WeightsInitializer, nameof(InitializeMode.None));
            CtlWeightsIniterParamA.Load(Config);

            CtlIsBias.Checked          = Config.GetBool(Const.Param.IsBias, false);
            CtlIsBiasConnected.Visible = CtlIsBias.Checked;
            CtlIsBiasConnected.Checked = CtlIsBias.Checked && Config.GetBool(Const.Param.IsBiasConnected, false);
            CtlActivationPanel.Visible = CtlIsBias.Checked;

            InitializeMode.Helper.FillComboBox(CtlActivationIniter, Config, Const.Param.ActivationInitializer, nameof(InitializeMode.Constant));
            CtlActivationIniterParamA.Load(Config);

            ActivationFunction.Helper.FillComboBox(CtlActivationFunc, Config, Const.Param.ActivationFunc, nameof(ActivationFunction.LogisticSigmoid));
            CtlActivationFuncParamA.Load(Config);

            StateChanged();
        }
Пример #7
0
        public override void SaveConfig()
        {
            if (CtlIsBias.Checked)
            {
                Config.Set(Const.Param.ActivationInitializer, CtlActivationIniter.SelectedItem.ToString());
                CtlActivationIniterParamA.Save(Config);
            }
            else
            {
                Config.Remove(Const.Param.ActivationInitializer);
                CtlActivationIniterParamA.Vanish(Config);
            }

            Config.Set(Const.Param.WeightsInitializer, CtlWeightsIniter.SelectedItem.ToString());
            CtlWeightsIniterParamA.Save(Config);

            Config.Set(Const.Param.ActivationFunc, CtlActivationFunc.SelectedItem.ToString());
            CtlActivationFuncParamA.Save(Config);

            Config.Set(Const.Param.IsBias, CtlIsBias.Checked);
            Config.Set(Const.Param.IsBiasConnected, CtlIsBias.Checked && CtlIsBiasConnected.Checked);
        }
Пример #8
0
        public override bool IsValid()
        {
            bool result = CtlInitial0.IsValid() && CtlInitial1.IsValid() && CtlActivationFuncParamA.IsValid();

            return(result &= GetNeuronsControls().All(n => n.IsValid()));
        }
 public override bool IsValid()
 {
     return(CtlActivationFuncParamA.IsValid());
 }
Пример #10
0
 public override void VanishConfig()
 {
     Config.Remove(Const.Param.ActivationFunc);
     CtlActivationFuncParamA.Vanish(Config);
 }
Пример #11
0
 public override void SaveConfig()
 {
     Config.Set(Const.Param.ActivationFunc, CtlActivationFunc.SelectedItem.ToString());
     CtlActivationFuncParamA.Save(Config);
 }