Maybe I'm missing something, but where is num_examples used here?
If `self.b` is a vector, then `p_sample` and `h_sample` would only contain 1 sample, not `num_examples` different ones.
Is that correct?