TensorAxis
Enums · AiDotNet.Enums
The SEMANTIC role of one axis of a tensor — what the numbers along that axis actually mean.
For Beginners
A tensor is just a block of numbers with a shape like [8, 3, 32]. The shape alone does not say whether “3” means three colour channels, three timesteps, or three of something else. This enum lets code state which it is, so mistakes are caught by name rather than by a crash.
How It Works
This exists because a shape on its own is ambiguous and nothing in the system can resolve it.
[8, 3, 32] is equally well a batch of 8 three-channel signals of length 32 (NCW), a batch of 8
sequences of 3 timesteps with 32 features (NTC), or 8 frames of a 3x32 image. The layer cannot tell,
the test generator cannot tell, and a reader cannot tell. Today the generator guesses from the model’s
DOMAIN tags, which is why it carries a long hand-written list of per-class fixture overrides — every
entry on that list is a case where the guess was wrong.
Naming an axis by ROLE removes the ambiguity at its source: NCW and NTC stop being the same shape,
because one declares Channels, Width and the other Time, Features.
Fields
| Field | Summary |
|---|---|
TensorAxis Batch |
Independent samples processed together. |
TensorAxis Channels |
Feature maps / colour channels. |
TensorAxis Classes |
Discrete output classes, e.g. |
TensorAxis Depth |
Spatial depth, for volumetric (3-D) data. |
TensorAxis Features |
Feature vector components, as consumed by a fully-connected layer. |
TensorAxis Frames |
Video frames, when frames are a separate axis from Time or Batch. |
TensorAxis Heads |
Attention heads. |
TensorAxis Height |
Spatial rows. |
TensorAxis Length |
Sequence position with no temporal meaning — the L in NCL, a 1-D signal’s samples. |
TensorAxis Other |
A real axis whose role is genuinely model-specific and not worth a shared name. |
TensorAxis Time |
Sequence position where the ordering is TEMPORAL and the model treats it as time. |
TensorAxis Width |
Spatial columns. |
int value__ |