9 #include <unordered_map> 11 #include "eteq/generated/pyapi.hpp" 17 #ifndef LAYR_ERR_APPROX_HPP 18 #define LAYR_ERR_APPROX_HPP 47 using ApproxF = std::function<AssignGroupsT(const VarErrsT&)>;
63 PybindT learning_rate = 0.5, std::string root_label =
"");
78 PybindT learning_rate = 0.5, PybindT discount_factor = 0.99,
79 PybindT epsilon = std::numeric_limits<PybindT>::epsilon(),
80 std::string root_label =
"");
90 #endif // LAYR_ERR_APPROX_HPP std::shared_ptr< VariableNode< T > > VarptrT
Smart pointer of variable nodes to preserve assign functions.
Definition: variable.hpp:210
NodeptrT source_
Variable update as to minimize the error in future iterations.
Definition: err_approx.hpp:36
std::string label_
Representation of assignment.
Definition: err_approx.hpp:30
void assign_groups_preupdate(const AssignGroupsT &groups, UpdateStepF update_step)
Apply all batches of assignments with update_step applied before each batch.
Definition: err_approx.cpp:73
std::vector< std::pair< eteq::VarptrT< PybindT >, NodeptrT > > VarErrsT
Ordered association between variable and error.
Definition: err_approx.hpp:24
std::vector< VarAssign > AssignsT
One batch of assignments.
Definition: err_approx.hpp:40
AssignGroupsT sgd(const VarErrsT &leaves, PybindT learning_rate=0.5, std::string root_label="")
Definition: err_approx.cpp:10
void assign_groups(const AssignGroupsT &groups, UpdateStepF update_step)
Apply all batches of assignments with update_step applied after each batch.
Definition: err_approx.cpp:58
std::function< AssignGroupsT(const VarErrsT &)> ApproxF
Definition: err_approx.hpp:47
std::vector< AssignsT > AssignGroupsT
All batches of assignments.
Definition: err_approx.hpp:43
Variable and error approximation assignment encapsulation.
Definition: err_approx.hpp:27
AssignGroupsT rms_momentum(const VarErrsT &leaves, PybindT learning_rate=0.5, PybindT discount_factor=0.99, PybindT epsilon=std::numeric_limits< PybindT >::epsilon(), std::string root_label="")
Definition: err_approx.cpp:27
std::function< void(teq::TensSetT &)> UpdateStepF
Definition: err_approx.hpp:51
std::shared_ptr< iNode< T > > NodeptrT
Smart pointer of node.
Definition: inode.hpp:63
eteq::VarptrT< PybindT > target_
Variable to assign to.
Definition: err_approx.hpp:33