예제 #1
0
 public ConfigurationFile()
 {
     // Retrieve instances
     annComp      = NinjectBinding.GetKernel.Get <AnnBuild>();
     backPropComp = NinjectBinding.GetKernel.Get <BackPropagation>();
     rPropComp    = NinjectBinding.GetKernel.Get <ResilientPropagation>();
 }
예제 #2
0
        private void Setup()
        {
            try
            {
                // Retrieve instances
                annComp = NinjectBinding.GetKernel.Get <AnnBuild>();
                config  = NinjectBinding.GetKernel.Get <ConfigurationFile>();

                learningModeComboBox.Items.Add(Global.LearningDescription[Global.LearningMode.BACK_PROPAGATION]);
                learningModeComboBox.Items.Add(Global.LearningDescription[Global.LearningMode.RESILIENT_PROPAGATION]);

                transferFunctionComboBox.Items.Add(Global.ActivationDescription[ActivationNeuroMode.HYPERBOLIC_TANGENT]);
                transferFunctionComboBox.Items.Add(Global.ActivationDescription[ActivationNeuroMode.IDENTITY]);
                transferFunctionComboBox.Items.Add(Global.ActivationDescription[ActivationNeuroMode.SIGMOIDAL]);
                transferFunctionComboBox.Items.Add(Global.ActivationDescription[ActivationNeuroMode.STEP]);

                initWModeComboBox.Items.Add(Global.SynInitDescription[SynInitMode.NGUYEN_WINDROW]);
                initWModeComboBox.Items.Add(Global.SynInitDescription[SynInitMode.FAN_IN]);
                initWModeComboBox.Items.Add(Global.SynInitDescription[SynInitMode.NONE]);
                initWModeComboBox.Items.Add(Global.SynInitDescription[SynInitMode.POSITIVE_NEGATIVE_RANGE]);
                initWModeComboBox.Items.Add(Global.SynInitDescription[SynInitMode.POSITIVE_RANGE]);
                initWModeComboBox.Items.Add(Global.SynInitDescription[SynInitMode.ZERO]);

                learningModeComboBox.SelectedIndex     = 0;
                transferFunctionComboBox.SelectedIndex = 0;
                initWModeComboBox.SelectedIndex        = 0;

                inputUnitsNumericUpDown.Value   = annComp.InputUnits;
                hiddenLayersNumericUpDown.Value = annComp.HiddenLayers;
                HiddenUnitsTextBox.Text         = string.Empty;
                foreach (uint i in annComp.HiddenUnits)
                {
                    HiddenUnitsTextBox.Text += i.ToString() + ';';
                }
                outputUnitsNumericUpDown.Value         = annComp.OutputUnits;
                transferFunctionComboBox.SelectedIndex =
                    transferFunctionComboBox.Items.IndexOf(Global.ActivationDescription[annComp.ActivationNeuroMode]);
                initWModeComboBox.SelectedIndex =
                    initWModeComboBox.Items.IndexOf(Global.SynInitDescription[annComp.SynInitMode]);
                learningModeComboBox.SelectedIndex =
                    learningModeComboBox.Items.IndexOf(Global.LearningDescription[annComp.LearningMode]);
                targetErrorNumericUpDown.Value = Convert.ToDecimal(annComp.ErrorTarget);
                epochsNumericUpDown.Value      = annComp.MaxEpochs;
                useBiasCheckBox.Checked        = annComp.Bias;
            }
            catch (Exception e)
            {
                ExceptionManager.LogAndShowException(e, "Error", logger);
            }
        }
예제 #3
0
파일: AppCore.cs 프로젝트: sandhaka/libsann
        protected void Setup()
        {
            // Network
            annConfig = NinjectBinding.GetKernel.Get <AnnBuild>();

            ann = new Ann();
            ann.Build(annConfig);

            mse     = new List <double>();
            outputs = new List <double[][]>();
            weights = new List <double>();

            logger.InfoFormat("Neural network has been built");
        }