/// <summary> /// Saves the network to the pocket if it has a lower error than /// the existing version of the network. /// </summary> /// <param name="network">The network to add to the pocket</param> /// <param name="trainer">The trainer training the network</param> public void SaveNetwork(Network network, Trainer trainer) { if (!saved) { DataStorageTag tag = new DataStorageTag(); tag.Description = "Pocket to manage the " + error + " error."; tag["last updated"] = trainer.EpochCount; tag["error value"] = trainer.ErrorManager.GetError(error); manager.AddObject(network, tag, fileName); saved = true; } else { DataStorageTag tag = manager.GetStorageTag(fileName); tag["last updated"] = trainer.EpochCount; tag["error value"] = trainer.ErrorManager.GetError(error); manager.UpdateFile(network, tag, fileName); } lastUpdateEpoch = trainer.EpochCount; lastErrorVal = trainer.ErrorManager.GetError(error); }
/// <summary> /// Adds data to the manager. /// </summary> /// <param name="data">The data to store</param> /// <param name="name">The name of the data file</param> /// <param name="tag">The data storage tag</param> public void AddInputData(ArrayList data, DataStorageTag tag, string name) { manager.AddObject(data, tag, name); }
/// <summary> /// Adds a result set to the vault with the given storage tag. /// </summary> /// <param name="data">The result set</param> /// <param name="name">The name of throws the result set</param> /// <param name="tag">The data storage tag</param> public void AddInputData(Neural.ResultSet data, DataStorageTag tag, string name) { manager.AddObject(data, tag, name); }
/// <summary> /// Add a new data reader to the vault. /// </summary> /// <param name="name">The name of the network</param> /// <param name="reader">The data reader</param> /// <param name="tag">The storage tag for this network</param> public void AddNetwork(Neural.Data.DataReader reader, DataStorageTag tag, string name) { myManager.AddObject(reader, tag, name); }
/// <summary> /// Adds a new example set to the vault with the given name and the given /// storage tag. /// </summary> /// <param name="eset">The example set to store</param> /// <param name="name">The name of the example set</param> /// <param name="tag">The Data Storage Tag for the example set</param> public void AddDataFile(ExampleSet eset, DataStorageTag tag, String name) { myManager.AddObject(eset, tag, name); }
/// <summary> /// Add a new network to the vault. /// </summary> /// <param name="name">The name of the network</param> /// <param name="network">The network</param> /// <param name="tag">The storage tag for this network</param> public void AddNetwork(Network network, DataStorageTag tag, string name) { myManager.AddObject(network, tag, name); }