ISupportsRepresentation<T, TInput>
Interfaces · AiDotNet.Interfaces
An opt-in capability for models that can expose a dense internal representation (embedding) of an input — typically the penultimate-layer activations.
For Beginners
A neural network turns an input into progressively more abstract features as it flows through layers. The activations just before the output layer are a compact “summary” of the input as the model sees it. Exposing that summary lets other tools reason about which inputs the model considers alike.
How It Works
Implement this when a model has a meaningful latent representation that downstream logic can use to judge how similar two inputs are to the model. Active-learning diversity uses it: measuring redundancy in representation space is far stronger than in raw input space. Models that do not implement it fall back to input features.
Methods
| Method | Summary |
|---|---|
Vector<T> GetRepresentation(TInput input) |
Returns the model’s dense internal representation (embedding) of a single input. |