Algorithm REF  provides the pseudo-code of the generative training of GMMC, which follows a similar design of IGEBM [1]} and JEM [2]} with a replay buffer \(B\) . For brevity, only one real sample \((\mathbf {x},y)\sim \mathcal {D}\)  and one generated sample \((\mathbf {x}^{\prime },y^{\prime })\sim p_{\mathbf {\theta }}(\mathbf {x}^{\prime },y^{\prime })\)  are used to optimize the parameter \(\mathbf {\theta }\) . It is straightforward to generalize the pseudo-code above to a mini-batch training, which is used in our experiments. Compared to JEM, GMMC needs no additional calculation of \(p_{\mathbf {\theta }}(y|\mathbf {x})\)  and thus has reduced computational complexity.
