コード例 #1
0
    public static NeuralNetwork LoadNeuralNetwork()
    {
        var nnet = new NeuralNetwork();

        if (!Load.CheckForFile("nn"))
        {
            throw new AccessViolationException("File not found");
        }
        string loaded = Load.FromFile("nn.txt");

        string[] network = loaded.Split(';');

        nnet.nn = new Matrix[network.Length];
        for (int i = 0; i < network.Length; i++)
        {
            nnet.nn[i] = Matrix.Parse(network[i]);
        }
        return(nnet);
    }