Typically, GMMs are trained with expectation-maximization, because of the need for implementing the unitary constraint over the categorical variables.
However, in Pytorch, it is possible to get a differentiable log probability from a GMM. Why is this possible? How exactly is the constraint implemented in the code?