j = 0; [w,j]=module_A(x,j); [y,j]=module_B(w,j); [z,j]=module_C(y,j);In this example, the input data x is processed in turn by modules “A", “B", and “C". Each module adds its contribution to the J-function. If the log-likelihood of z is given by log p(z), then log p(x) = J + log p(z), where x is the accumulated J-function of the chain, is an estimate of the likelihood function of the input data x. To re-synthesize x from the chain output z, we would use:
y=module_C_synth(z); w=module_B_synth(y); x=module_A_synth(w);Furthermore, if is first drawn randomly from , then the reconstructed samples will be drawn from the data distribution . This provides a modular way to create generative models.