mlpack  master
Public Member Functions | Private Member Functions | Private Attributes | List of all members
mlpack::ann::WeightSetVisitor Class Reference

WeightSetVisitor update the module parameters given the parameters set. More...

Inheritance diagram for mlpack::ann::WeightSetVisitor:
Inheritance graph
[legend]

Public Member Functions

 WeightSetVisitor (arma::mat &&weight, const size_t offset=0)
 Update the parameters given the parameters set and offset. More...
 
template<typename LayerType >
size_t operator() (LayerType *layer) const
 Update the parameters set. More...
 

Private Member Functions

template<typename T , typename P >
std::enable_if< !HasParametersCheck< T, P &(T::*)()>::value &&!HasModelCheck< T, std::vector< LayerTypes > &(T::*)()>::value, size_t >::type LayerSize (T *layer, P &&input) const
 Do not update the parameters if the module doesn't implement the Parameters() or Model() function. More...
 
template<typename T , typename P >
std::enable_if< !HasParametersCheck< T, P &(T::*)()>::value &&HasModelCheck< T, std::vector< LayerTypes > &(T::*)()>::value, size_t >::type LayerSize (T *layer, P &&input) const
 Update the parameters if the module implements the Model() function. More...
 
template<typename T , typename P >
std::enable_if< HasParametersCheck< T, P &(T::*)()>::value &&!HasModelCheck< T, std::vector< LayerTypes > &(T::*)()>::value, size_t >::type LayerSize (T *layer, P &&input) const
 Update the parameters if the module implements the Parameters() function. More...
 
template<typename T , typename P >
std::enable_if< HasParametersCheck< T, P &(T::*)()>::value &&HasModelCheck< T, std::vector< LayerTypes > &(T::*)()>::value, size_t >::type LayerSize (T *layer, P &&input) const
 Update the parameters if the module implements the Model() and Parameters() function. More...
 

Private Attributes

const size_t offset
 The parameters offset. More...
 
arma::mat && weight
 The parameters set. More...
 

Detailed Description

WeightSetVisitor update the module parameters given the parameters set.

Definition at line 27 of file weight_set_visitor.hpp.

Constructor & Destructor Documentation

mlpack::ann::WeightSetVisitor::WeightSetVisitor ( arma::mat &&  weight,
const size_t  offset = 0 
)

Update the parameters given the parameters set and offset.

Member Function Documentation

template<typename T , typename P >
std::enable_if< !HasParametersCheck<T, P&(T::*)()>::value && !HasModelCheck<T, std::vector<LayerTypes>&(T::*)()>::value, size_t>::type mlpack::ann::WeightSetVisitor::LayerSize ( T *  layer,
P &&  input 
) const
private

Do not update the parameters if the module doesn't implement the Parameters() or Model() function.

template<typename T , typename P >
std::enable_if< !HasParametersCheck<T, P&(T::*)()>::value && HasModelCheck<T, std::vector<LayerTypes>&(T::*)()>::value, size_t>::type mlpack::ann::WeightSetVisitor::LayerSize ( T *  layer,
P &&  input 
) const
private

Update the parameters if the module implements the Model() function.

template<typename T , typename P >
std::enable_if< HasParametersCheck<T, P&(T::*)()>::value && !HasModelCheck<T, std::vector<LayerTypes>&(T::*)()>::value, size_t>::type mlpack::ann::WeightSetVisitor::LayerSize ( T *  layer,
P &&  input 
) const
private

Update the parameters if the module implements the Parameters() function.

template<typename T , typename P >
std::enable_if< HasParametersCheck<T, P&(T::*)()>::value && HasModelCheck<T, std::vector<LayerTypes>&(T::*)()>::value, size_t>::type mlpack::ann::WeightSetVisitor::LayerSize ( T *  layer,
P &&  input 
) const
private

Update the parameters if the module implements the Model() and Parameters() function.

template<typename LayerType >
size_t mlpack::ann::WeightSetVisitor::operator() ( LayerType *  layer) const

Update the parameters set.

Member Data Documentation

const size_t mlpack::ann::WeightSetVisitor::offset
private

The parameters offset.

Definition at line 42 of file weight_set_visitor.hpp.

arma::mat&& mlpack::ann::WeightSetVisitor::weight
private

The parameters set.

Definition at line 39 of file weight_set_visitor.hpp.


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