SequentialVectorModelLayoutBase<T>

Base Classes · AiDotNet.NeuralNetworks

Base class for vector models whose declared Layers collection is the complete, literal inference graph in execution order.

Inheritance: NeuralNetworkBase<T> → DeclaredModelLayoutBase<T> → VectorModelLayoutBase<T> → SequentialVectorModelLayoutBase<T>

Known derived types: FeedForwardNeuralNetwork<T>, NeuralNetwork<T>

How It Works

This is an execution-topology contract, not a shape guess. Models opt in by choosing this base only after their forward has been verified to apply every declared layer exactly once in list order. The base then supplies framework services that are safe only for a true sequential graph, including the allocation-efficient named-activation fold.

The capability is intentionally limited to a model that directly chooses this base. A subclass of such a model falls back to tracing its actual forward because it may override inference and introduce branches, shared stages, input transforms, or generation loops. A still-sequential subclass can opt in explicitly after verifying its own forward contract.