Encog.Utility.NetworkUtil.NetWorkUtility.LoadNetwork(string directory, string file)
Example :
var mynet = Encog.Utility.NetworkUtil.NetWorkUtility.LoadNetwork(@"c:\encognetworks","mynetworkfile");
//don't need to cast into a basic network i already do it in the method.
OR (the way jeff made it, which is the real way if you want to understand the behind the scenes):
FileInfo networkFile = FileUtil.CombinePath(new FileInfo(directory), file);
// network file
if (!networkFile.Exists)
{
Console.WriteLine(@"Can't read file: " + networkFile);
return null;
}
var network = (BasicNetwork)EncogDirectoryPersistence.LoadObject(networkFile);
Thanks for the contributions, the shortcut methods look very good. I will have to take a further look soon. I, or someone, will port those to the Java side.
2 ways:
2 ways:
Encog.Utility.NetworkUtil.NetWorkUtility.LoadNetwork(string directory, string file)
Example :
var mynet = Encog.Utility.NetworkUtil.NetWorkUtility.LoadNetwork(@"c:\encognetworks","mynetworkfile");
//don't need to cast into a basic network i already do it in the method.
OR (the way jeff made it, which is the real way if you want to understand the behind the scenes):
FileInfo networkFile = FileUtil.CombinePath(new FileInfo(directory), file);
// network file
if (!networkFile.Exists)
{
Console.WriteLine(@"Can't read file: " + networkFile);
return null;
}
var network = (BasicNetwork)EncogDirectoryPersistence.LoadObject(networkFile);
Thanks for the contributions,
Thanks for the contributions, the shortcut methods look very good. I will have to take a further look soon. I, or someone, will port those to the Java side.