示例#1
0
文件: Output.cs 项目: n1arash/Vortex
        public override void Optimize()
        {
            Matrix deltaW = OptimizerFunction.CalculateDeltaW(Params["W"], Grads["DW"]);
            Matrix deltaB = OptimizerFunction.CalculateDeltaB(Params["B"], Grads["DB"]);

            Params["W"] -= deltaW;
            Params["B"] -= deltaB;
        }
示例#2
0
文件: Network.cs 项目: xuan2261/XNet
        public void Optimize()
        {
            MatrixData data = Data;

            for (int i = 1; i < Layers.Count; i++)
            {
                Data.Data["W" + i.ToString()] -= Matrix.Transpose(OptimizerFunction.CalculateDeltaW(Data.Data["W" + i.ToString()], Data.Data["dW" + i.ToString()]));
                Data.Data["b" + i.ToString()] -= OptimizerFunction.CalculateDeltaB(Data.Data["b" + i.ToString()], Data.Data["db" + i.ToString()]);
            }
            Data = data;
        }