AIMA.Core.Learning.Neural.Layer.getLastWeightUpdateMatrix C# (CSharp) Method

getLastWeightUpdateMatrix() public method

public getLastWeightUpdateMatrix ( ) : Matrix
return Matrix
	public Matrix getLastWeightUpdateMatrix() {
		return lastWeightUpdateMatrix;
	}

Usage Example

示例#1
0
        public Matrix calculateWeightUpdates(LayerSensitivity layerSensitivity,
                                             Vector previousLayerActivationOrInput, double alpha, double momentum)
        {
            Layer  layer = layerSensitivity.getLayer();
            Matrix activationTranspose = previousLayerActivationOrInput.transpose();
            Matrix momentumLessUpdate  = layerSensitivity.getSensitivityMatrix()
                                         .times(activationTranspose).times(alpha).times(-1.0);
            Matrix updateWithMomentum = layer.getLastWeightUpdateMatrix().times(
                momentum).plus(momentumLessUpdate.times(1.0 - momentum));

            layer.acceptNewWeightUpdate(updateWithMomentum.copy());
            return(updateWithMomentum);
        }
All Usage Examples Of AIMA.Core.Learning.Neural.Layer::getLastWeightUpdateMatrix