Gaussian mixture models in PyTorch.
A new model is instantiated by calling
gmm.GaussianMixture(..)and providing as arguments the number of components, as well as the tensor dimension. Note that once instantiated, the model expects tensors in a flattened shape
The first step would usually be to fit the model via
model.fit(data), then predict with
model.predict(data). To reproduce the above figure, just run the provided
Some sanity checks can be executed by calling
python test.py. To fit data on GPUs, ensure that you first call