Beispiel #1
0
        /// <exception cref="System.IO.IOException"/>
        public static SimpleMatrix LoadMatrix(string binaryName, string textName)
        {
            File matrixFile = new File(binaryName);

            if (matrixFile.Exists())
            {
                return(SimpleMatrix.LoadBinary(matrixFile.GetPath()));
            }
            matrixFile = new File(textName);
            if (matrixFile.Exists())
            {
                return(NeuralUtils.LoadTextMatrix(matrixFile));
            }
            throw new Exception("Could not find either " + binaryName + " or " + textName);
        }