Thank you for your answer. What I was writing is basically creating various mixture distributions. I still can not figure out how to create mixture distributions except for the code of the mixture in the same family in pytorch.