class
SushiAI::NN::ParameterVisitor
Non-owning type-erased parameter callback wrapper.
- Declared in
include/SushiAI/nn/module.hpp
Public member functions
template <typename Fn, typename = std::enable_if_t< !std::is_same<std::decay_t<Fn>, ParameterVisitor>::value>>
ParameterVisitor(Fn &callable) noexceptWraps a callable reference that must outlive this visitor.
Template parameters
FnCallable type invocable as (const std::string&, Parameter&).
Parameters
callableTarget callback stored by address.
void operator()(const std::string &name, Parameter ¶meter) constApplies the wrapped callback.
Parameters
nameThe parameter's dotted name.
parameterThe parameter itself.

