protected CY_NeuronToNeuronConn(FromLayer fromLayer, ToLayer toLayer, CY_NeuronToNeuronType connectionMode)
        {
            toLayer.from.Add(this);
            fromLayer.to.Add(this);
            this.fromLayer      = fromLayer;
            this.toLayer        = toLayer;
            this.connectionMode = connectionMode;
            this.initializer    = new CY_Init_Tanh(1);
            switch (connectionMode)
            {
            case CY_NeuronToNeuronType.Complete:
                synapses = new TSynapse[fromLayer.neurons.Length * toLayer.neurons.Length];
                break;

            case CY_NeuronToNeuronType.OneOne:
                if (fromLayer.neurons.Length == toLayer.neurons.Length)
                {
                    synapses = new TSynapse[fromLayer.neurons.Length];
                    break;
                }
                break;
            }
        }
Exemple #2
0
 public CY_NeuronToNeuronBackprop(CY_NeuronLayer fromLayer, CY_NeuronLayer toLayer, CY_NeuronToNeuronType connectionMode)
     : base(fromLayer, toLayer, connectionMode)
 {
     connect();
 }