Inference in this model class in intractable, so as has been done in previous work on topic modeling (Ng and Jordan, 2003) we rely on variational methods to approximate the gradients needed during training as well as the posteriors over the topic bit vectors.
we will need the gradients of the normalizer and the sum of the energy function over the hidden variables which we refer to as the marginal energy.