class
SushiAI::NN::ILayer
One layer of a model whose architecture came from a file.
- Declared in
include/SushiAI/nn/ilayer.hpp
Public member functions
virtual ~ILayer()=defaultvirtual Graph::ValueId forward(const Graph::GraphBuilder &builder, Graph::ValueId x)=0Traces the layer, declaring its parameters on first call.
Parameters
builderWhere the nodes go.
xThe input value.
Returns
The result's id.
virtual void walk_parameters(std::string_view prefix, const ParameterVisitor &visitor)=0Applies visitor to every declared parameter this layer owns.
Parameters
prefixThe name prefix this layer's parameters hang under.
visitorCalled once per declared parameter.
virtual Shape output_shape() const noexcept=0Returns the per-sample shape after this layer, batch axis excluded.
int64_t output_features() const noexceptReturns the element count of output_shape().

