示例#1
0
 /// <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>
 /// Updates the given data set and the storage tag.
 /// </summary>
 /// <param name="data">The data set</param>
 /// <param name="name">The name of the data set</param>
 /// <param name="tag">The data storage tag</param>
 public void UpdateDataSet(ArrayList data, DataStorageTag tag, string name)
 {
     manager.UpdateFile(data, tag, name);
 }
示例#3
0
 /// <summary>
 /// Update the result set in the vault with the given storage tag.
 /// </summary>
 /// <param name="data">The result set</param>
 /// <param name="name">The name of the storage tag</param>
 /// <param name="tag">The data storage tag</param>
 public void UpdateDataSet(Neural.ResultSet data, DataStorageTag tag, string name)
 {
     manager.UpdateFile(data, tag, name);
 }
 /// <summary>
 /// Update the given data reader without changing the data storage tag.
 /// </summary>
 /// <param name="name">The name of the data reader to update</param>
 /// <param name="reader">The data reader configuration</param>
 public void UpdateReader(Neural.Data.DataReader reader, string name)
 {
     myManager.UpdateFile(name, reader);
 }
 /// <summary>
 /// Updates the given data file and data storage tag.
 /// </summary>
 /// <param name="eset">The data to update</param>
 /// <param name="name">The name of the data set</param>
 /// <param name="tag">The data storage tag for the data</param>
 public void UpdateDataFile(ExampleSet eset, DataStorageTag tag, String name)
 {
     myManager.UpdateFile(eset, tag, name);
 }
示例#6
0
 /// <summary>
 /// Update the given network without changing the data storage tag.
 /// </summary>
 /// <param name="name">The name of the network to update</param>
 /// <param name="network">network The network data</param>
 public void UpdateNetwork(Network network, string name)
 {
     myManager.UpdateFile(name, network);
 }