Open 3D Engine MachineLearning Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
MachineLearning::SupervisedLearningCycle Class Reference

#include <Training.h>

Public Member Functions

 SupervisedLearningCycle (INeuralNetworkPtr model, ILabeledTrainingDataPtr trainingData, ILabeledTrainingDataPtr testData, LossFunctions costFunction, AZStd::size_t totalIterations, AZStd::size_t batchSize, float learningRate, float learningRateDecay, float earlyStopCost)
 
void InitializeContexts ()
 
void StartTraining ()
 
void StopTraining ()
 

Public Attributes

AZStd::atomic< AZStd::size_t > m_currentEpoch = 0
 
std::atomic< bool > m_trainingComplete = true
 
AZ::ThreadSafeDeque< float > m_testCosts
 
AZ::ThreadSafeDeque< float > m_trainCosts
 
INeuralNetworkPtr m_model
 
bool m_shuffleTrainingData = true
 
TrainingDataView m_trainData
 
TrainingDataView m_testData
 
LossFunctions m_costFunction = LossFunctions::MeanSquaredError
 
AZStd::size_t m_totalIterations = 0
 
AZStd::size_t m_batchSize = 0
 
float m_learningRate = 0.0f
 
float m_learningRateDecay = 0.0f
 
float m_earlyStopCost = 0.0f
 
AZStd::size_t m_currentIndex = 0
 
AZStd::unique_ptr< IInferenceContextm_inferenceContext
 
AZStd::unique_ptr< ITrainingContextm_trainingContext
 

Detailed Description

Performs a supervised learning training cycle. Supervised learning is a form of machine learning where a model is provided a set of training data with expected output Training then takes place in an iterative loop where the total error (cost, loss) of the model is minimized This differs from unsupervised learning, where the training data lacks any form of labeling (expected correct output), and the model is expected to learn the underlying structures of data on its own.


The documentation for this class was generated from the following file: