public virtual FloatArray BackWard(FloatArray backprop)
        {
            var DO = _activationFunction.Derivate(_target.SumVector, _target.OutputVector);

            _target.ErrorVector = DO * backprop;
            return((_target.ErrorVector * _target.KnowlodgeMatrix).SumColumn());
        }
Exemple #2
0
        public virtual Array <FloatArray> BackWard(FloatArray backprop)
        {
            var DO = _activationFunction.Derivate(_target.Sum, _target.OutputVector);

            _target.ErrorVector = DO * backprop;
            var back = new Array <FloatArray>(_target.ConectionsSize.Length);

            //Parallel.For(0, _target.ConectionsSize.Length, i => back[i] = (_target.ErrorVector * _target.KnowlodgeMatrix[i]).SumColumn());
            for (int i = 0; i < _target.ConectionsSize.Length; i++)
            {
                back[i] = (_target.ErrorVector * _target.KnowlodgeMatrix[i]).SumColumn();
            }
            return(back);
        }
        public void BackWard(Array <float> values)
        {
            var DE = _errorFunction.Error(_target.OutputVector, values);
            var DO = _activationFunction.Derivate(_target.SumVector);

            _target.ErrorVector       = DE * DO;
            _target.ErrorWeightVector = NumMath.SumLine(_target.ErrorVector.W * _target.KnowlodgeMatrix);
        }