Contents

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) noexcept

Wraps a callable reference that must outlive this visitor.

Template parameters

Fn

Callable type invocable as (const std::string&, Parameter&).

Parameters

callable

Target callback stored by address.

void operator()(const std::string &name, Parameter &parameter) const

Applies the wrapped callback.

Parameters

name

The parameter's dotted name.

parameter

The parameter itself.