IBatchAwareShapeContract
Interfaces · AiDotNet.Interfaces
Opt-in for a contract whose answer depends on whether the incoming rank INCLUDES a batch axis.
Implements: IShapeContract
Known implementations: FlattenLayer<T>, ReshapeLayer<T>
How It Works
Almost no layer needs this, so it is a separate interface rather than a member every contract has
to think about. Call it through OutputAxesFor,
which falls back to the rank-only form for the contracts that do not implement this - so a caller
never has to test for it.
Methods
| Method | Summary |
|---|---|
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank, bool isBatched) |
One entry per output axis, for an input of the given rank, saying whether that rank INCLUDES a batch axis. |