Improvement and Application of Generative Adversarial Networks Algorithm Based on Transfer Learning
Algorithm 1
Improved original generative adversarial network Algorithm. D and G are the two parts that make up the GANs. Really sampled data t and the noise data n. is the sample generated by G that is closest to real data. is the discriminator of really sampled data, and is the discriminator of fake data from the generator.
Input: noise data from standard normal distribution and from the generated distributed data .
Output: The losses of generator and discriminator.
For generative adversarial network training times do
For k times do
Select m small batch samples from standard normal distribution .
Select m small batch samples from the generated distributed data .
Optimize discriminator weights by stochastic gradient ascent algorithm:
end For
Select m random samples from standard normal distribution .
Optimize generator weights by random gradient descent algorithm: