GPUMLib  0.2.2
GPU Machine Learning Library
Public Member Functions | Friends | List of all members

Represents a Restricted Boltzman Machine (Host - CPU). More...

#include <HostRBM.h>

Public Member Functions

 RBMhost (int visibleUnits, int hiddenUnits, HostMatrix< cudafloat > &inputs, cudafloat initialLearningRate, cudafloat momentum=DEFAULT_MOMENTUM, bool useBinaryValuesVisibleReconstruction=false, cudafloat stdWeights=STD_WEIGHTS)
 
void RandomizeWeights (cudafloat stdWeights)
 
void RandomizeWeights (cudafloat stdWeights, cudafloat initialLearningRate)
 
void RandomizeWeights ()
 Randomizes the weights of the RBM.
 
void ContrastiveDivergence (int n)
 
cudafloat MeanSquareError () const
 
int Epoch () const
 
HostMatrix< cudafloatGetWeights ()
 
HostArray< cudafloatGetVisibleBias ()
 
HostArray< cudafloatGetHiddenBias ()
 
HostMatrix< cudafloatGetOutputs ()
 

Friends

class DBNhost
 

Detailed Description

Represents a Restricted Boltzman Machine (Host - CPU).

Examples:
DBNapp.cpp.

Definition at line 39 of file HostRBM.h.

Constructor & Destructor Documentation

RBMhost ( int  visibleUnits,
int  hiddenUnits,
HostMatrix< cudafloat > &  inputs,
cudafloat  initialLearningRate,
cudafloat  momentum = DEFAULT_MOMENTUM,
bool  useBinaryValuesVisibleReconstruction = false,
cudafloat  stdWeights = STD_WEIGHTS 
)
inline

Constructs a Restricted Boltzman Machine that can be trained using the CPU (Host).

Parameters
visibleUnitsNumber of inputs.
hiddenUnitsNumber of hidden neurons.
inputsInputs of the training dataset. Each row of the matrix should contain a pattern (sample) and each column an input.
initialLearningRateInitial learning rate.
momentumMomentum (optional).
useBinaryValuesVisibleReconstructionUse binary values for the visibible layer reconstruction (optional, default = false)
stdWeightsDefines the maximum and minimum value for the weights. The weights will be initialized with a random number between -stdWeights and stdWeights.

Definition at line 124 of file HostRBM.h.

Member Function Documentation

int Epoch ( ) const
inline

Gets the current training epoch.

Returns
The current epoch.
Examples:
DBNapp.cpp.

Definition at line 353 of file HostRBM.h.

HostArray<cudafloat> GetHiddenBias ( )
inline

Gets the hidden units bias

Returns
an array with the bias
Examples:
DBNapp.cpp.

Definition at line 403 of file HostRBM.h.

HostArray<cudafloat> GetVisibleBias ( )
inline

Gets the visible units bias

Returns
an array with the bias
Examples:
DBNapp.cpp.

Definition at line 397 of file HostRBM.h.

HostMatrix<cudafloat> GetWeights ( )
inline

Gets the weights matrix

Returns
the weights matrix
Examples:
DBNapp.cpp.

Definition at line 391 of file HostRBM.h.

cudafloat MeanSquareError ( ) const
inline

Gets the mean square error of the RBM.

Returns
The mean square error.
Examples:
DBNapp.cpp.

Definition at line 335 of file HostRBM.h.

void RandomizeWeights ( cudafloat  stdWeights)
inline

Randomizes the weights of the RBM, between -stdWeights and stdWeights.

Parameters
stdWeightsDefines the maximum and minimum value for the weights.

Definition at line 162 of file HostRBM.h.

void RandomizeWeights ( cudafloat  stdWeights,
cudafloat  initialLearningRate 
)
inline

Randomizes the weights of the RBM, between -stdWeights and stdWeights.

Parameters
stdWeightsDefines the maximum and minimum value for the weights.
initialLearningRateInitial learning rate.

Definition at line 170 of file HostRBM.h.


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