include/dll/trainer/stochastic_gradient_descent.hpp
explicit sgd_trainer(dbn_t& dbn) : dbn(dbn), full_context(build_context<full_sgd_context>(dbn)), iteration(1) {
        // Inherit dimensions from front to end (for transform layers)

        cpp::for_each_pair(full_context, [](auto& layer_ctx_1, auto& layer_ctx_2) {
            constexpr bool l2_transform = decay_layer_traits<decltype(layer_ctx_2.first)>::is_transform_layer();

            if (l2_transform) {
                this_type::inherit_from_front(layer_ctx_1, layer_ctx_2);
            }
        });
    }
/*!
     * \brief construct a new sgd_trainer
     * \param dbn The DBN being trained
     */
\brief construct a new sgd_trainer
\param dbn The DBN being trained
\ brief construct a new sgd_trainer \ param dbn The DBN being trained
explicit sgd_trainer(dbn_t& dbn) : dbn(dbn), full_context(build_context<full_sgd_context>(dbn)), iteration(1) {
        cpp::for_each_pair(full_context, [](auto& layer_ctx_1, auto& layer_ctx_2) {
            constexpr bool l2_transform = decay_layer_traits<decltype(layer_ctx_2.first)>::is_transform_layer();
            if (l2_transform) {
                this_type::inherit_from_front(layer_ctx_1, layer_ctx_2);
            }
        });
    }
explicit sgd_trainer ( dbn_t & dbn ) : dbn ( dbn ) , full_context ( build_context < full_sgd_context > ( dbn ) ) , iteration ( 1 ) { cpp :: for_each_pair ( full_context , [ ] ( auto & layer_ctx_1 , auto & layer_ctx_2 ) { constexpr bool l2_transform = decay_layer_traits < decltype ( layer_ctx_2 . first ) > :: is_transform_layer ( ) ; if ( l2_transform ) { this_type :: inherit_from_front ( layer_ctx_1 , layer_ctx_2 ) ; } } ) ; }
\brief construct a new sgd_trainer
 \param dbn The DBN being trained
\ brief construct a new sgd_trainer \ param dbn The DBN being trained
// Inherit dimensions from front to end (for transform layers)