SImPaPaperConstants
Helpers & Utilities · AiDotNet.MetaLearning.Components
The architecture constants specified by SImPa’s paper, in one non-generic place.
How It Works
NON-GENERIC ON PURPOSE. These constants were previously declared on
ImplicitPosteriorGenerator and CompressionLemmaKLEstimator, which
meant every consumer had to name a type argument to reach a plain integer —
ImplicitPosteriorGenerator<double>.PaperLatentDimension. The double there carries
no meaning: 128 is 128 whatever the numeric type, and the reader has to stop and work out that the
type argument was picked arbitrarily rather than because the value depends on it. Worse, an options
class generic in its own T would appear to consult a different class’s constant, so
somebody would eventually “fix” the mismatch by writing
ImplicitPosteriorGenerator<T>.PaperLatentDimension — which does not compile as a field
initializer default, having made a constant depend on a type parameter for no reason.
The generic classes keep their Paper* members as forwarding aliases so existing callers and
their default parameter values are unaffected; this type is simply where the numbers now live.
Source: Nguyen, Do and Carneiro, “PAC-Bayes meta-learning with implicit task-specific posteriors” (arXiv:2003.02455).
Fields
| Field | Summary |
|---|---|
int FirstHiddenWidth |
The paper’s first generator hidden width. |
int LatentDimension |
The paper’s latent dimension: z ~ U[0,1]^128. |
int MonteCarloSamples |
Monte Carlo samples the paper draws when training the phi-network per task. |
int SecondHiddenWidth |
The paper’s second generator hidden width. |