|
Algorithm 1 Traing NVP-MC |
|
Input:
Energy function , batch size M, learning rate , number of iterations N, empty buffer B, transition kernels and . |
|
1: Initialize B using HMC without the MH step. Initialize the parameters of the transition kernel and parameters of the discriminator .
|
|
2: for
do
|
|
3: Sample a batch of Gaussian noise as the start points.
|
|
4: for do
|
|
5: Randomly sample a number u in open interval .
|
|
6: Choose transition kernel:
|
|
7: Generate the new sample through
|
|
8: Accept the new sample with probability computed by Equation (4),
|
|
9: and replace the samples in B with the accepted samples.
|
|
end for
|
|
10: Sample a batch from B as the correct samples.
|
|
11: Update the discriminator:
|
|
12:
|
|
13: Update the transition kernel: |
|
14:
|
|
end for
|