TaskVariantOfAttribute
Attributes ยท AiDotNet.Attributes
Declares that a model is the same network as another model of the same paper, adapted to a different task.
Inheritance: Attribute โ TaskVariantOfAttribute
How It Works
One architecture often serves several tasks: SAM is a promptable segmenter and an image encoder, ResNet a classifier and a detection backbone. Each task gets its own model type, and both types cite the paper. That is legitimate only when the two really run one network; two separate implementations of one paper drift apart, and one of them goes untested (ADNDEF001).
The analyzer verifies the claim: the two models must both construct (directly or through the types they construct) a type, or call a LayerHelper factory, that no model of another paper uses. That shared piece is the network. A declaration it cannot verify is an error (ADNDEF005).
Constructors
| Constructor | Summary |
|---|---|
TaskVariantOfAttribute(Type canonical, string task) |
Creates the declaration. |
Properties
| Property | Summary |
|---|---|
Type Canonical { get; } |
The model this one shares its network with, as an open generic type (for example typeof(SAM<>)). |
string Task { get; } |
The task this model adapts the network to. |