SmartEngine  1.6.0
Public Member Functions | List of all members
SmartEngine::IGradientDescentTrainer Class Referenceabstract

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...

#include <GradientDescentTrainer.h>

Inheritance diagram for SmartEngine::IGradientDescentTrainer:
SmartEngine::ILossTrainer SmartEngine::IObject SmartEngine::IResource SmartEngine::IObject SmartEngine::ISerializable SmartEngine::IObject

Public Member Functions

virtual void SetTrainingInfo (const GradientDescentTrainingInfo &info)=0
 Overrides the training info from what was passed into the constructor More...
 
virtual void Train (int generationCount)=0
 Synchronously trains for the specified number of iterations More...
 
virtual void Reset ()=0
 Resets the internal state of the trainer. More...
 
- Public Member Functions inherited from SmartEngine::ILossTrainer
virtual void SetTrainingMethod (const LossTrainingMethodInfo &info)=0
 Sets the training method and associated parameters More...
 
virtual float GetLoss ()=0
 Returns the loss in the graph. More...
 
virtual uint32 GetGenerationCount () const =0
 Returns the number of generations we have been training for. More...
 
- Public Member Functions inherited from SmartEngine::IObject
virtual ObjectId GetId () const =0
 Returns the ID of this object. More...
 
virtual void AddRef () const =0
 Increments the internal reference count on this object. It is not common to use this method directly. More...
 
virtual void Release () const =0
 Decrements the internal reference count on this object. It is not common to use this method directly. More...
 
virtual int GetRefCount () const =0
 Returns the number of references to this object. More...
 
virtual void * QueryInterface (ObjectClassId id)=0
 Queries the object for an interface and returns a pointer to that interface if found. More...
 
void operator= (IObject const &x)=delete
 
- Public Member Functions inherited from SmartEngine::IResource
virtual const char * GetResourceName () const =0
 Returns the name of this resource passed to the constructor. More...
 
virtual SerializationResult GetLastLoadResult () const =0
 Returns the result of the last call to Load(). Useful for checking loaded data state after creation. More...
 
virtual SerializationResult Load (const char *appendName=nullptr)=0
 Load this object from disk. More...
 
virtual SerializationResult Save (const char *appendName=nullptr)=0
 Save this object to disk. More...
 
- Public Member Functions inherited from SmartEngine::ISerializable
virtual SerializationResult Serialize (IMemoryBuffer *buffer)=0
 Write the contents of this object to a buffer. More...
 
virtual SerializationResult Deserialize (IMemoryBuffer *buffer)=0
 Fill this object with contents from a buffer. More...
 

Additional Inherited Members

- Public Attributes inherited from SmartEngine::IObject
 private
 
 __pad0__: IObject() {} IObject(IObject const&) = delete
 

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()

virtual void SmartEngine::IGradientDescentTrainer::Reset ( )
pure virtual

Resets the internal state of the trainer.

◆ SetTrainingInfo()

virtual void SmartEngine::IGradientDescentTrainer::SetTrainingInfo ( const GradientDescentTrainingInfo info)
pure virtual

Overrides the training info from what was passed into the constructor

Parameters
info

◆ Train()

virtual void SmartEngine::IGradientDescentTrainer::Train ( int  generationCount)
pure virtual

Synchronously trains for the specified number of iterations

Parameters
generationCount