class
SushiAI::NN::Sequential
template <typename... Ls>Applies layers in sequence and indexes parameter paths.
- Declared in
include/SushiAI/nn/layers.hpp
Template parameters
LsLayer types in forward application order.
Public member functions
explicit constexpr Sequential(Ls... layers)Constructs from the layers themselves.
Parameters
layersThe layers, in application order; moved in.
Graph::ValueId forward(const Graph::GraphBuilder &builder, Graph::ValueId x)Traces every layer in order.
Parameters
builderWhere the nodes go.
xThe input value.
Returns
The last layer's result.
template <typename Fn>
void visit_children(Fn &&visitor)Applies visitor to each child with its index.
Parameters
visitorCalled as visitor(std::size_t index, Layer& child).
template <std::size_t Index>
auto & layer() noexceptDirect access to the Index-th layer.
Static public member functions
static constexpr auto fields()No parameters of its own; the children own them all.
static constexpr std::size_t size() noexceptHow many layers this container holds.

