This poses difficulty in practice due to the discrete nature of the clustering.
maximizing over the latent variables involves nondifferentiable argmax operations: To tackle this problem, we use the recently proposed Gumbel-Softmax to approximate the clustering decision during training.