Esempio n. 1
0
    public void Initialise()
    {
        if (Parameters == null)
        {
            Debug.Log("Building PFNN failed because no parameters were loaded.");
            return;
        }

        Xmean = Parameters.GetMatrix(0).Build();
        Xstd  = Parameters.GetMatrix(1).Build();
        Ymean = Parameters.GetMatrix(2).Build();
        Ystd  = Parameters.GetMatrix(3).Build();

        W0 = new Matrix[50];
        W1 = new Matrix[50];
        W2 = new Matrix[50];
        b0 = new Matrix[50];
        b1 = new Matrix[50];
        b2 = new Matrix[50];
        for (int i = 0; i < 50; i++)
        {
            W0[i] = Parameters.GetMatrix(4 + i * 6 + 0).Build();
            W1[i] = Parameters.GetMatrix(4 + i * 6 + 1).Build();
            W2[i] = Parameters.GetMatrix(4 + i * 6 + 2).Build();
            b0[i] = Parameters.GetMatrix(4 + i * 6 + 3).Build();
            b1[i] = Parameters.GetMatrix(4 + i * 6 + 4).Build();
            b2[i] = Parameters.GetMatrix(4 + i * 6 + 5).Build();
        }

        X = new Matrix(XDim, 1);
        Y = new Matrix(YDim, 1);
    }
Esempio n. 2
0
 private void SetupMatrix(int index)
 {
     NetworkParameters.FloatMatrix matrix = Parameters.GetMatrix(index);
     for (int i = 0; i < matrix.Rows; i++)
     {
         for (int j = 0; j < matrix.Cols; j++)
         {
             SetValue(Network, index, i, j, matrix.Values[i].Values[j]);
         }
     }
 }
Esempio n. 3
0
    public void Initialise()
    {
        if (Parameters == null)
        {
            Debug.Log("Building MLP failed because no parameters were loaded.");
            return;
        }

        Xmean = Parameters.GetMatrix(0).Build();
        Xstd  = Parameters.GetMatrix(1).Build();
        Ymean = Parameters.GetMatrix(2).Build();
        Ystd  = Parameters.GetMatrix(3).Build();

        W0 = Parameters.GetMatrix(4).Build();
        W1 = Parameters.GetMatrix(5).Build();
        W2 = Parameters.GetMatrix(6).Build();
        b0 = Parameters.GetMatrix(7).Build();
        b1 = Parameters.GetMatrix(8).Build();
        b2 = Parameters.GetMatrix(9).Build();

        X = new Matrix(XDim, 1);
        Y = new Matrix(YDim, 1);
    }