Gaussian mixture model (GMM) as an NNModuleSpec #
The GMM model spec defines the math for mixture weights, means, and covariances.
This file adds a small NNModuleSpec wrapper so the GMM can be composed/exported.
def
Spec.GMMModuleSpec
{α : Type}
[Context α]
{nComponents nFeatures : ℕ}
(m : GMMSpec α nComponents nFeatures)
:
ModSpec.NNModuleSpec α (Shape.dim nFeatures Shape.scalar) (Shape.dim nComponents Shape.scalar)
GMM module specification following NNModuleSpec.