|
| RBM (randomType &rng) |
|
std::string | name () const |
| From INameable: return the class name. More...
|
|
std::size_t | numberOfParameters () const |
| Returns the total number of parameters of the model. More...
|
|
RealVector | parameterVector () const |
| Returns the parameters of the Model as parameter vector. More...
|
|
void | setParameterVector (const RealVector &newParameters) |
| Sets the parameters of the model. More...
|
|
void | setStructure (std::size_t visibleNeurons, std::size_t hiddenNeurons) |
| Creates the structure of the RBM. More...
|
|
HiddenType const & | hiddenNeurons () const |
| Returns the layer of hidden neurons. More...
|
|
HiddenType & | hiddenNeurons () |
| Returns the layer of hidden neurons. More...
|
|
VisibleType & | visibleNeurons () |
| Returns the layer of visible neurons. More...
|
|
VisibleType const & | visibleNeurons () const |
| Returns the layer of visible neurons. More...
|
|
RealMatrix & | weightMatrix () |
| Returns the weight matrix connecting the layers. More...
|
|
RealMatrix const & | weightMatrix () const |
| Returns the weight matrix connecting the layers. More...
|
|
EnergyType | energy () const |
| Returns the energy function of the RBM. More...
|
|
randomType & | rng () |
| Returns the random number generator associated with this RBM. More...
|
|
void | evaluationType (bool forward, bool evalMean) |
| Sets the type of evaluation, eval will perform. More...
|
|
Shape | outputShape () const |
| Returns the shape of the output. More...
|
|
Shape | inputShape () const |
| Returns the expected shape of the input. More...
|
|
boost::shared_ptr< State > | createState () const |
| Creates an internal state of the model. More...
|
|
void | eval (BatchInputType const &patterns, BatchOutputType &outputs) const |
| Passes information through/samples from an RBM in a forward or backward way. More...
|
|
void | eval (BatchInputType const &patterns, BatchOutputType &outputs, State &state) const |
| Standard interface for evaluating the response of the model to a batch of patterns. More...
|
|
void | inputHidden (RealMatrix &inputs, RealMatrix const &visibleStates) const |
| Calculates the input of the hidden neurons given the state of the visible in a batch-vise fassion. More...
|
|
void | inputVisible (RealMatrix &inputs, RealMatrix const &hiddenStates) const |
| Calculates the input of the visible neurons given the state of the hidden. More...
|
|
std::size_t | numberOfHN () const |
| Returns the number of hidden Neurons. More...
|
|
std::size_t | numberOfVN () const |
| Returns the number of visible Neurons. More...
|
|
void | read (InArchive &archive) |
| Reads the network from an archive. More...
|
|
void | write (OutArchive &archive) const |
| Writes the network to an archive. More...
|
|
| AbstractModel () |
|
virtual | ~AbstractModel () |
|
const Features & | features () const |
|
virtual void | updateFeatures () |
|
bool | hasFirstParameterDerivative () const |
| Returns true when the first parameter derivative is implemented. More...
|
|
bool | hasFirstInputDerivative () const |
| Returns true when the first input derivative is implemented. More...
|
|
virtual void | eval (InputType const &pattern, OutputType &output) const |
| Standard interface for evaluating the response of the model to a single pattern. More...
|
|
Data< OutputType > | operator() (Data< InputType > const &patterns) const |
| Model evaluation as an operator for a whole dataset. This is a convenience function. More...
|
|
OutputType | operator() (InputType const &pattern) const |
| Model evaluation as an operator for a single pattern. This is a convenience function. More...
|
|
BatchOutputType | operator() (BatchInputType const &patterns) const |
| Model evaluation as an operator for a single pattern. This is a convenience function. More...
|
|
virtual void | weightedParameterDerivative (BatchInputType const &pattern, BatchOutputType const &outputs, BatchOutputType const &coefficients, State const &state, RealVector &derivative) const |
| calculates the weighted sum of derivatives w.r.t the parameters. More...
|
|
virtual void | weightedInputDerivative (BatchInputType const &pattern, BatchOutputType const &outputs, BatchOutputType const &coefficients, State const &state, BatchInputType &derivative) const |
| calculates the weighted sum of derivatives w.r.t the inputs More...
|
|
virtual void | weightedDerivatives (BatchInputType const &patterns, BatchOutputType const &outputs, BatchOutputType const &coefficients, State const &state, RealVector ¶meterDerivative, BatchInputType &inputDerivative) const |
| calculates weighted input and parameter derivative at the same time More...
|
|
virtual | ~IParameterizable () |
|
virtual | ~INameable () |
|
virtual | ~ISerializable () |
| Virtual d'tor. More...
|
|
void | load (InArchive &archive, unsigned int version) |
| Versioned loading of components, calls read(...). More...
|
|
void | save (OutArchive &archive, unsigned int version) const |
| Versioned storing of components, calls write(...). More...
|
|
| BOOST_SERIALIZATION_SPLIT_MEMBER () |
|
template<class VisibleLayerT, class HiddenLayerT, class randomT>
class shark::RBM< VisibleLayerT, HiddenLayerT, randomT >
stub for the RBM class. at the moment it is just a holder of the parameter set and the Energy.
Definition at line 43 of file RBM.h.
template<class VisibleLayerT , class HiddenLayerT , class randomT >
Passes information through/samples from an RBM in a forward or backward way.
Eval performs its operation based on the given evaluation type. There are two ways to pass data through an RBM: either forward, setting the states of the visible neurons and sample the hidden states or backwards, where the state of the hidden is fixed and the visible are sampled. Instead of the state of the hidden/visible, one often wants the mean of the state \( E_{p(h|v)}\left(h\right)\). By default, the RBM uses the forward evaluation and returns the mean of the state, but other evaluation modes can be set by evaluationType().
- Parameters
-
patterns | the batch of (visible or hidden) inputs |
outputs | the batch of (visible or hidden) outputs |
Reimplemented from shark::AbstractModel< RealVector, RealVector >.
Definition at line 242 of file RBM.h.
Referenced by shark::RBM< VisibleLayerT, HiddenLayerT, randomT >::eval().
template<class VisibleLayerT , class HiddenLayerT , class randomT >
void shark::RBM< VisibleLayerT, HiddenLayerT, randomT >::evaluationType |
( |
bool |
forward, |
|
|
bool |
evalMean |
|
) |
| |
|
inline |
Sets the type of evaluation, eval will perform.
Eval performs its operation based on the state of this function. There are two ways to pass data through an rbm: either forward, setting the states of the visible neurons and sample the hidden states or backwards, where the state of the hidden is fixed and the visible are sampled. Instead of the state of the hidden/visible, one often wants the mean of the state \( E_{p(h|v)}\left(h\right)\). By default, the RBM uses the forward evaluation and returns the mean of the state
- Parameters
-
forward | whether the forward view should be used false=backwards |
evalMean | whether the mean state should be returned. false=a sample is returned |
Definition at line 205 of file RBM.h.
Referenced by main().