Exemplo n.º 1
0
        public NeuronLayeredNetwork(IList <int> arities)
        {
            this.layers = new IList <IValue> [arities.Count];

            this.layers[0] = new List <IValue>();

            for (int k = 0; k < arities[0]; k++)
            {
                this.layers[0].Add(new RealValue());
            }

            for (int k = 1; k < arities.Count; k++)
            {
                this.layers[k] = new List <IValue>();

                for (int j = 0; j < arities[k]; j++)
                {
                    this.layers[k].Add(new Neuron(WeightedValue.CreateWeightedValue(this.layers[k - 1])));
                }
            }
        }
Exemplo n.º 2
0
        public WeightedValue CreateWeightedValue()
        {
            IList <IValue> values = new List <IValue>(this.neurons);

            return(WeightedValue.CreateWeightedValue(values));
        }