Пример #1
0
 public virtual void Create(List<double> signal, NeuronNetworkArchitecture architecture)
 {
 }
Пример #2
0
        public override void Create(List<double> signal, NeuronNetworkArchitecture architecture)
        {
            network.SetSignal(signal);

                if (architecture.CountInputNeurons > 0)
                {
                    inputLayer = network.CreateInputLayer(2);
                }
                else
                {
                    throw new Exception("Не задано количество входных нейронов");
                }
                if (architecture.CountOutputNeurons > 0)
                {
                    outputLayer = network.CreateOutputLayer(architecture.CountOutputNeurons);
                }
                else
                {
                    throw new Exception("Не задано количество выходных нейронов");
                }

                inputLayer.ConnectLayer(outputLayer);

                activationFunction = new Sigmoid();
        }
        private void networkParametersMenuItem_Click(object sender, RoutedEventArgs e)
        {
            NetworkParametersWindow networkParameters = new NetworkParametersWindow();
            NeuronNetworkArchitecture archtecture = new NeuronNetworkArchitecture();

            if(networkParameters.ShowDialog() == true)
            {
                archtecture.CountInputNeurons = Convert.ToInt32(networkParameters.countInputNeurons.Text);
                archtecture.CountOutputNeurons = Convert.ToInt32(networkParameters.countOutputNeurons.Text);
                archtecture.CountHiddenLayers = Convert.ToInt32(networkParameters.countHiddenLayer.Text);
                archtecture.CountNeuronsInLayer = Convert.ToInt32(networkParameters.countNeuronsInHiddenLayer.Text);

                perceptron.Create(generateSignal(2), archtecture);
            }
        }