Exemple #1
0
 public void AddOutputLayer(int[] Offsets, ScalarFunction Activator)
 {
     if (this._phase != 0)
         throw new InvalidOperationException("Cannot alter the state of the network after it has been constructed");
     this._terminis = new OutputLinearLayer(Offsets, Activator);
 }
Exemple #2
0
 public NeuralLinkLinear(NeuralLayer ForwardLayer, NeuralLayer BackwardLayer)
     : base(ForwardLayer, BackwardLayer)
 {
 }
Exemple #3
0
        // Construction Methods //
        public void AddDataLayer(int[] Offsets, bool Bias)
        {

            if (this._phase != 0)
                throw new InvalidOperationException("Cannot alter the state of the network after it has been constructed");
            this._origin = new DataLayer(Offsets, Bias);

        }
Exemple #4
0
        public NeuralLink(NeuralLayer ForwardLayer, NeuralLayer BackwardLayer)
        {

            // Set this size //
            this.BACKWARD_SIZE = BackwardLayer.SIZE;
            this.FORWARD_SIZE = ForwardLayer.SIZE;

            // Set the counts //
            this.ROW_COUNT = BackwardLayer.SIZE;
            this.COL_COUNT = (ForwardLayer.BIAS ? ForwardLayer.SIZE - 1 : ForwardLayer.SIZE);

            // Bind nodes to this layer //
            this.BACKWARD_LAYER = BackwardLayer;
            this.FORWARD_LAYER = ForwardLayer;
            
            // Bind the layers to this node //
            this.FORWARD_LAYER.BACKWARD_LINK = this;
            this.BACKWARD_LAYER.FORWARD_LINK = this;

            this.GRADIENT = new double[this.ROW_COUNT, this.COL_COUNT];
            this.LAG_GRADIENT = new double[this.ROW_COUNT, this.COL_COUNT];
            this.WORK_GRADIENT = new double[this.ROW_COUNT, this.COL_COUNT];
            
            this.WEIGHT = new double[this.ROW_COUNT, this.COL_COUNT];
            this.LAG_WEIGHT = new double[this.ROW_COUNT, this.COL_COUNT];

            this.DELTA = new double[this.ROW_COUNT, this.COL_COUNT];
            this.LAG_DELTA = new double[this.ROW_COUNT, this.COL_COUNT];

        }