14 #ifndef MLPACK_METHODS_ANN_VISITOR_DETERMINISTIC_SET_VISITOR_HPP 15 #define MLPACK_METHODS_ANN_VISITOR_DETERMINISTIC_SET_VISITOR_HPP 19 #include <boost/variant.hpp> 35 template<
typename LayerType>
42 const bool deterministic;
47 typename std::enable_if<
48 HasDeterministicCheck<T, bool&(T::*)(void)>::value &&
49 HasModelCheck<T>::value,
void>::type
50 LayerDeterministic(T* layer)
const;
55 typename std::enable_if<
56 !HasDeterministicCheck<T, bool&(T::*)(void)>::value &&
57 HasModelCheck<T>::value,
void>::type
58 LayerDeterministic(T* layer)
const;
63 typename std::enable_if<
64 HasDeterministicCheck<T, bool&(T::*)(void)>::value &&
65 !HasModelCheck<T>::value,
void>::type
66 LayerDeterministic(T* layer)
const;
71 typename std::enable_if<
72 !HasDeterministicCheck<T, bool&(T::*)(void)>::value &&
73 !HasModelCheck<T>::value,
void>::type
74 LayerDeterministic(T* layer)
const;
81 #include "deterministic_set_visitor_impl.hpp" boost::variant< Recurrent< arma::mat, arma::mat > *, RecurrentAttention< arma::mat, arma::mat > *, ReinforceNormal< arma::mat, arma::mat > *, Reparametrization< arma::mat, arma::mat > *, Select< arma::mat, arma::mat > *, Sequential< arma::mat, arma::mat, false > *, Sequential< arma::mat, arma::mat, true > *, Subview< arma::mat, arma::mat > *, VRClassReward< arma::mat, arma::mat > *, VirtualBatchNorm< arma::mat, arma::mat > *> MoreTypes
DeterministicSetVisitor(const bool deterministic=true)
Set the deterministic parameter given the current deterministic value.
DeterministicSetVisitor set the deterministic parameter given the deterministic value.
void operator()(LayerType *layer) const
Set the deterministic parameter.