Research Article

Digital Image Art Style Transfer Algorithm Based on CycleGAN

Algorithm 2

CycleGAN algorithm.
BEGIN
FOR training iterations DO:
Extract n sample data from the X field {x(1), …, x(n)}.
Extract m sample data from the Y field {y(1), …, y(m)} .
.
Calculate the discriminator loss of the generated data .
Optimize the discriminator network parameters.
Calculate the generator loss of Y ⟶ X
.
Calculate the generator loss of X ⟶ Y
.
Optimize generator network parameters.
END FOR.
END.