NeuralEngine
A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes.
NeuralEngine::MachineLearning::GPModels::AEP::BSGPR< Scalar > Class Template Reference

Blendshape Inference based on AEP_SGPR. More...

#include <FgBlendshapeSGPR.h>

Inheritance diagram for NeuralEngine::MachineLearning::GPModels::AEP::BSGPR< Scalar >:
Collaboration diagram for NeuralEngine::MachineLearning::GPModels::AEP::BSGPR< Scalar >:

Public Member Functions

 BSGPR (const af::array &Y, const af::array &X, std::vector< std::string > bsList, std::vector< std::string > controllerList, int numInducing=20, Scalar alpha=1.0, LogLikType lType=LogLikType::Gaussian)
 Constructor. More...
 
 BSGPR ()
 Default constructor. More...
 
std::vector< std::string > GetBSList ()
 Gets the list of blendshape names. More...
 
std::vector< std::string > GetControlList ()
 Gets the names of controler input list. More...
 
- Public Member Functions inherited from NeuralEngine::MachineLearning::GPModels::AEP::SGPR< Scalar >
 SGPR (const af::array &Y, const af::array &X, int numInducing=20, Scalar alpha=1.0, LogLikType lType=LogLikType::Gaussian)
 Constructor. More...
 
virtual Scalar Function (const af::array &x, af::array &outGradient) override
 Cost function the given parameter inputs. More...
 
 SGPR ()
 Default constructor. More...
 
- Public Member Functions inherited from NeuralEngine::MachineLearning::GPModels::SparseGPBaseModel< Scalar >
 SparseGPBaseModel (const af::array &Y, const af::array &X, int numInducing=200, LogLikType lType=LogLikType::Gaussian)
 Constructor. More...
 
 SparseGPBaseModel ()
 Default constructor. More...
 
virtual ~SparseGPBaseModel ()
 Destructor. More...
 
virtual void PredictF (const af::array &testInputs, af::array &mf, af::array &vf) override
 Predict noise free functions values \(\mathbf{F}_*\). More...
 
virtual void SampleY (const af::array inputs, int numSamples, af::array &outFunctions) override
 Generate function samples from posterior. More...
 
af::array GetTrainingInputs ()
 Gets training inputs X. More...
 
void SetTrainingInputs (af::array &inputs)
 Gets training inputs X. More...
 
af::array GetPseudoInputs ()
 Gets pseudo inputs. More...
 
virtual bool Init () override
 Initializes the model. More...
 
virtual int GetNumParameters () override
 Gets number of parameters. More...
 
virtual void SetParameters (const af::array &param) override
 Sets the parameters for each optimization iteration. More...
 
virtual af::array GetParameters () override
 Gets the parameters for each optimization iteration. More...
 
virtual void UpdateParameters () override
 Updates the parameters. More...
 
virtual void FixKernelParameters (bool isfixed)
 Sets fixation for hyperparameters. More...
 
virtual void FixInducing (bool isfixed)
 Set fixation for inducing inputs. More...
 
SparseGPBaseLayer< Scalar > * GetGPLayer ()
 Gets the gp layer. More...
 
- Public Member Functions inherited from NeuralEngine::MachineLearning::GPModels::GPBaseModel< Scalar >
 GPBaseModel (const af::array &Y, LogLikType lType=LogLikType::Gaussian, ModelType mtype=ModelType::GPR)
 Constructor. More...
 
 GPBaseModel ()
 Default Constructor. More...
 
virtual ~GPBaseModel ()
 Destructor. More...
 
virtual void Optimise (OptimizerType method=L_BFGS, Scalar tol=0.0, bool reinit_hypers=true, int maxiter=1000, int mb_size=0, LineSearchType lsType=MoreThuente, bool disp=true, int *cycle=nullptr)
 Optimizes the model parameters for best fit. More...
 
virtual bool Init ()
 Initializes the model. More...
 
virtual void PredictF (const af::array &testInputs, af::array &mf, af::array &vf)
 Predict noise free functions values \(\mathbf{F}_*\). More...
 
virtual void PredictY (const af::array &testInputs, af::array &my, af::array &vy)
 Prediction of test outputs \(\mathbf{Y}_*\). More...
 
virtual void SampleY (const af::array inputs, int numSamples, af::array &outFunctions)
 Generate function samples from posterior. More...
 
virtual void AddData (const af::array Ytrain)
 Adds training data to the model. More...
 
af::array GetTrainingData ()
 Gets the training data set Y. More...
 
void SetTrainingData (af::array &data)
 Sets training data Y. More...
 
virtual int GetNumParameters ()
 Gets number of parameters. More...
 
virtual void SetParameters (const af::array &param)
 Sets the parameters for each optimization iteration. More...
 
virtual af::array GetParameters ()
 Gets the parameters for each optimization iteration. More...
 
virtual void UpdateParameters ()
 Updates the parameters. More...
 
virtual void FixLikelihoodParameters (bool isfixed)
 Sets the likelihood parameters to be fixed or not for optimization. More...
 
void SetSegments (af::array segments)
 Sets fixation for hyperparameters. More...
 
af::array GetSegments ()
 Gets the start index array for the sequences. More...
 
- Public Member Functions inherited from NeuralEngine::MachineLearning::IModel< Scalar >
virtual Scalar Function (const af::array &x, af::array &outGradient)
 Cost function the given x inputs. More...
 
virtual int GetNumParameters ()=0
 Gets number of parameters to be optimized. More...
 
virtual void SetParameters (const af::array &param)=0
 Sets the parameters for each optimization iteration. More...
 
virtual af::array GetParameters ()=0
 Gets the parameters for each optimization iteration. More...
 
virtual void UpdateParameters ()=0
 Updates the parameters. More...
 
int GetDataLenght ()
 Gets data lenght. More...
 
int GetDataDimensionality ()
 Gets data dimensionality. More...
 
ModelType GetModelType ()
 Gets model type. More...
 
virtual void SetBatchSize (int size)
 Sets batch size. More...
 
int GetBatchSize ()
 Gets batch size. More...
 
void SetIndexes (af::array &indexes)
 Sets the batch indexes. More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, unsigned int version)
 

Private Attributes

std::vector< std::string > sBSNames
 list of blendshape names More...
 
std::vector< std::string > sContNames
 list of contoler names More...
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Member Functions inherited from NeuralEngine::MachineLearning::IModel< Scalar >
 IModel (int numData, int numDimension, ModelType type)
 Constructor. More...
 
- Protected Attributes inherited from NeuralEngine::MachineLearning::GPModels::SparseGPBaseModel< Scalar >
int ik
 number of inducing inputs More...
 
int iq
 latent dimension More...
 
af::array afX
 training inputs More...
 
SparseGPBaseLayer< Scalar > * gpLayer
 gp layer More...
 
- Protected Attributes inherited from NeuralEngine::MachineLearning::GPModels::GPBaseModel< Scalar >
bool bInit
 check if model is initialized More...
 
af::array afY
 training dataset, mean substracted More...
 
af::array afBias
 the bias More...
 
af::array afSegments
 Index of starting positions for all trials. More...
 
LikelihoodBaseLayer< Scalar > * likLayer
 liklihood layer More...
 
- Protected Attributes inherited from NeuralEngine::MachineLearning::IModel< Scalar >
ModelType mType
 
int iN
 dataset length More...
 
int iD
 dataset dimension More...
 
int iBatchSize
 size of the batch More...
 
af::array afIndexes
 indexes of /f$\mathbf{X}/f$ for batch learning More...
 
af::dtype m_dType
 floating point precision flag for af::array More...
 

Detailed Description

template<typename Scalar>
class NeuralEngine::MachineLearning::GPModels::AEP::BSGPR< Scalar >

Blendshape Inference based on AEP_SGPR.

Prediction of Blendshape weights for given controler input positions.

, 22.03.2022.

Definition at line 35 of file FgBlendshapeSGPR.h.

Constructor & Destructor Documentation

◆ BSGPR() [1/2]

template<typename Scalar >
NeuralEngine::MachineLearning::GPModels::AEP::BSGPR< Scalar >::BSGPR ( const af::array &  Y,
const af::array &  X,
std::vector< std::string >  bsList,
std::vector< std::string >  controllerList,
int  numInducing = 20,
Scalar  alpha = 1.0,
LogLikType  lType = LogLikType::Gaussian 
)

Constructor.

, 12.06.2018.

Parameters
YThe training data.
XThe training inputs.
bsListList of blendshape names.
controllerListList of controller names.
numInducing(Optional) number of inducing inputs.
alpha(Optional) The alpha.
lType(Optional) likelihood type.

◆ BSGPR() [2/2]

Default constructor.

Hmetal T, 08/03/2020.

Member Function Documentation

◆ GetBSList()

template<typename Scalar >
std::vector< std::string > NeuralEngine::MachineLearning::GPModels::AEP::BSGPR< Scalar >::GetBSList ( )

Gets the list of blendshape names.

Hmetal T, 22/03/2022.

Returns
The bs list.

◆ GetControlList()

template<typename Scalar >
std::vector< std::string > NeuralEngine::MachineLearning::GPModels::AEP::BSGPR< Scalar >::GetControlList ( )

Gets the names of controler input list.

Hmetal T, 22/03/2022.

Returns
The control list.

◆ serialize()

template<typename Scalar >
template<class Archive >
void NeuralEngine::MachineLearning::GPModels::AEP::BSGPR< Scalar >::serialize ( Archive &  ar,
unsigned int  version 
)
inlineprivate

Definition at line 92 of file FgBlendshapeSGPR.h.

Friends And Related Function Documentation

◆ boost::serialization::access

template<typename Scalar >
friend class boost::serialization::access
friend

Definition at line 89 of file FgBlendshapeSGPR.h.

Member Data Documentation

◆ sBSNames

template<typename Scalar >
std::vector<std::string> NeuralEngine::MachineLearning::GPModels::AEP::BSGPR< Scalar >::sBSNames
private

list of blendshape names

Definition at line 86 of file FgBlendshapeSGPR.h.

◆ sContNames

template<typename Scalar >
std::vector<std::string> NeuralEngine::MachineLearning::GPModels::AEP::BSGPR< Scalar >::sContNames
private

list of contoler names

Definition at line 87 of file FgBlendshapeSGPR.h.


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