Example #1
0
        public Layer(int inputs, int outputs, INeuron baseNeuron, WeightInitializer weightInitializer)
        {
            this.inputs            = inputs;
            this.outputs           = outputs;
            this.weightInitializer = weightInitializer;

            InitializeNeurons(baseNeuron);
            ReinitializeWeights();
        }
Example #2
0
        public SOMNetwork(INeuron baseNeuron, int inputs, int outputs, int maxEpoch)
        {
            this.inputs            = inputs;
            this.outputs           = outputs;
            this.weightInitializer = new WeightInitializer(0, 1);
            this.maxEpoch          = maxEpoch;

            InitializeNeurons(baseNeuron);
            ReinitializeWeights();
        }
Example #3
0
        private void CreateLayers(INeuron baseNeuron, int inputs, int outputs, WeightInitializer weightInitializer, int hiddenNeurons)//TODO multi hidden layer support
        {
            layers = new List <Layer>();

            if (hiddenNeurons > 0)
            {
                layers.Add(new Layer(inputs, hiddenNeurons, baseNeuron, weightInitializer));
                layers.Add(new Layer(hiddenNeurons, outputs, baseNeuron, weightInitializer));
            }
            else
            {
                layers.Add(new Layer(inputs, outputs, baseNeuron, weightInitializer));
            }
        }
Example #4
0
 public NeuralNetwork(INeuron baseNeuron, int inputs, int outputs, WeightInitializer weightInitializer, int hiddenNeurons)
 {
     CreateLayers(baseNeuron, inputs, outputs, weightInitializer, hiddenNeurons);
 }