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

WeightSizeVisitor returns the number of weights of the given module. More...

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

Public Member Functions

template<typename LayerType >
size_t operator() (LayerType *layer) const
 Return the number of weights. 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 &output) const
 If the module doesn't implement the Parameters() or Model() function return 0. 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 &output) const
 Return the number of 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 &output) const
 Return the number of 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 &output) const
 Return the accumulated number of parameters if the module implements the Parameters() and Model() function. More...
 

Detailed Description

WeightSizeVisitor returns the number of weights of the given module.

Definition at line 28 of file weight_size_visitor.hpp.

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::WeightSizeVisitor::LayerSize ( T *  layer,
P &  output 
) const
private

If the module doesn't implement the Parameters() or Model() function return 0.

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::WeightSizeVisitor::LayerSize ( T *  layer,
P &  output 
) const
private

Return the number of 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::WeightSizeVisitor::LayerSize ( T *  layer,
P &  output 
) const
private

Return the number of 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::WeightSizeVisitor::LayerSize ( T *  layer,
P &  output 
) const
private

Return the accumulated number of parameters if the module implements the Parameters() and Model() function.

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

Return the number of weights.


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