示例#1
0
		/// <summary>
		/// Attaches a trainer to the network and establishes any necessary structures
		/// for training.
		/// </summary>
		/// <param name="trainer">The trainer that will perform the training</param>
		public void BeginTraining(Trainer trainer) {
            foreach (KeyValuePair<String, Neuron> entry in neurons)
            {
                entry.Value.SetNeuralTrainer(trainer.GetTraining());
            }
		}
示例#2
0
		///
		/// Save the network to the pocket with the named error calculator.
		/// @param error The name of the error.
		/// @param network The network to save.
		/// @param trainer The trainer training the network.
		///
		public void SaveNetwork(string error, Network network, Trainer trainer) 
		{
			PocketManager manager = (PocketManager)managers[error];
			if(trainer.ErrorManager.GetError(error) < manager.GetLastUpdateError())  
			{
				manager.SaveNetwork(network, trainer);
			}
		}
示例#3
0
		/// <summary>
		/// Creates a new training epoch event.
		/// </summary>
		/// <param name="trainer">The trainer conducting the trainer</param>
		/// <param name="network">The network being trained</param>
		public TrainingEpochEvent(Trainer trainer, Network network) {
			this.trainer = trainer;
			this.network = network;
		}
示例#4
0
		/// <summary>
		/// Creates a new training epoch event.
		/// </summary>
		/// <param name="trainer"></param>
		public TrainingEpochEvent(Trainer trainer) 
		{
			this.trainer = trainer;
		}
 /// <summary>
 /// Creates a new training epoch event.
 /// </summary>
 /// <param name="trainer">The trainer conducting the trainer</param>
 /// <param name="network">The network being trained</param>
 public TrainingEpochEvent(Trainer trainer, Network network)
 {
     this.trainer = trainer;
     this.network = network;
 }
 /// <summary>
 /// Creates a new training epoch event.
 /// </summary>
 /// <param name="trainer"></param>
 public TrainingEpochEvent(Trainer trainer)
 {
     this.trainer = trainer;
 }