SmartEngine  1.6.0
Classes | Public Member Functions | List of all members
SmartEngine.NeuralNetworks.GradientDescentTrainer Class Reference

Trains a set of networks using gradient descent. Training with GradientDescentTrainer requires a Loss structure and thus the output of the network must be known. If only a relative loss about the network is known, a GeneticTrainer needs to be used. More...

Inheritance diagram for SmartEngine.NeuralNetworks.GradientDescentTrainer:
SmartEngine.NeuralNetworks.LossTrainer SmartEngine.Resource SmartEngine.Object SmartEngine.ISerializable SmartEngine.Disposable

Classes

class  CInfo
 GradientDescentTrainer constructor info More...
 

Public Member Functions

 GradientDescentTrainer (CInfo cinfo)
 
void SetTrainingInfo (GradientDescentTrainingInfo info)
 Overrides the training info from what was passed into the constructor More...
 
void Train (int generationCount)
 Synchronously trains for the specified number of iterations More...
 
void Reset ()
 Resets the internal state of the trainer. More...
 
IEnumerator TrainAsync (int generationCount)
 Asynchrounously trains for the specified number of iterations More...
 
- Public Member Functions inherited from SmartEngine.NeuralNetworks.LossTrainer
unsafe void SetTrainingMethod (SmartEngine.NeuralNetworks.LossTrainingMethodInfo info)
 Sets the training method and associated parameters More...
 
- Public Member Functions inherited from SmartEngine.Resource
SerializationResult Load (string appendName=null)
 Load this object from disk. More...
 
SerializationResult Save (string appendName=null)
 Save this object to disk. More...
 
SerializationResult Serialize (MemoryBuffer buffer)
 Write the contents of this object to a buffer. More...
 
SerializationResult Serialize (out byte[] data)
 Write the contents of this object to a byte array. More...
 
SerializationResult Deserialize (MemoryBuffer buffer)
 Fill this object with contents from a buffer. More...
 
SerializationResult Deserialize (byte[] data)
 Fill this object with contents from a byte array. More...
 
- Public Member Functions inherited from SmartEngine.Object
void AddRef ()
 Increments the internal reference count on this object. It is not common to use this method directly. More...
 
void Release ()
 Decrements the internal reference count on this object. It is not common to use this method directly. More...
 
- Public Member Functions inherited from SmartEngine.Disposable
void Dispose ()
 Cleans up any internal state. It is not safe to use an object after it has been disposed. More...
 

Additional Inherited Members

- Properties inherited from SmartEngine.NeuralNetworks.LossTrainer
uint GenerationCount [get]
 Returns the number of generations we have been training for. More...
 
float Loss [get]
 Returns the loss in the graph. More...
 
- Properties inherited from SmartEngine.Resource
string ResourceName [get]
 Returns the name of this resource passed to the constructor. More...
 
SerializationResult LastLoadResult [get]
 Returns the result of the last call to Load(). Useful for checking loaded data state after creation. More...
 

Detailed Description

Trains a set of networks using gradient descent. Training with GradientDescentTrainer requires a Loss structure and thus the output of the network must be known. If only a relative loss about the network is known, a GeneticTrainer needs to be used.

Member Function Documentation

◆ Reset()

void SmartEngine.NeuralNetworks.GradientDescentTrainer.Reset ( )

Resets the internal state of the trainer.

◆ SetTrainingInfo()

void SmartEngine.NeuralNetworks.GradientDescentTrainer.SetTrainingInfo ( GradientDescentTrainingInfo  info)

Overrides the training info from what was passed into the constructor

Parameters
info

◆ Train()

void SmartEngine.NeuralNetworks.GradientDescentTrainer.Train ( int  generationCount)

Synchronously trains for the specified number of iterations

Parameters
generationCount

◆ TrainAsync()

IEnumerator SmartEngine.NeuralNetworks.GradientDescentTrainer.TrainAsync ( int  generationCount)

Asynchrounously trains for the specified number of iterations

Parameters
generationCount
Returns
An IEnumerator that can be used in a coroutine