Hello,



 dpernes:

If we apply log() to p, there is no obvious way to simplify the expression, since we get the logarithm of a sum…


That is the log-sum-exp computation I mentioned.
I have implemented something that sounds similar to what your description in the GaussianMixture1d's forward method in this
1d Mixture Density Network notebook 180.
Best regards
Thomas