Research Article

Artificial Intelligence-Based Digital Media Design Effect Enhancement Mechanism

Algorithm 1

The training algorithm of GAN.
Input: raw data and noise data
Output: The GAN model
(1)initialize the parameters and of the model randomly;
(2)for each epoch i = 1, 2, …, do
(3)for each step j = 1, 2, …, do
(4)  sample minibatch of m noise samples from noise data;
(5)  sample minibatch of m examples x from raw data;
(6)  calculate the loss and gradient:
(7)  update the parameters and of the discriminator D;
(8)end for
(9) sample minibatch of m noise samples from noise data;
(10) calculate the partial derivatives of the parameters:
   
(11) update the parameters and of the generator G;
(12)end for
(13)Return the GAN model with parameters.