Generative AI with Python and TensorFlow by Joseph Babcock Raghav Bali
Author:Joseph Babcock, Raghav Bali
Language: eng
Format: epub
Publisher: Packt
Published: 2021-04-28T07:43:56+00:00
The training loop for CycleGAN is mostly similar to that of pix2pix with a few additions. As we have two pairs of generators and discriminators, the function takes all four models as input along with a combined gan object. The training loop starts with the generation of fake samples from both generators and then uses them to update weights for their corresponding discriminators. These are then combined to train the overall GAN model as well.
Using the components described in this section, we experimented with two sets of style transfer datasets, turning apples into oranges and turning photographs into Van Gogh paintings. Figure 7.11 shows the output of the apples to oranges experiment through different stages of training:
Figure 7.11: CycleGAN generated outputs at different stages of training for the apples to oranges experiment
Similarly, Figure 7.12 shows how CycleGAN learns to transform photographs into Van Gogh style artwork:
Figure 7.12: CycleGAN generated outputs at different stages of training for the photographs to Van Gogh style paintings experiment
As is evident from the samples above (Figures 7.11 and 7.12), CycleGAN seems to have picked up the nuances from both domains without having paired training samples. This is a good leap forward in cases where paired samples are hard to get.
Another important observation from the two experiments is the amount of training required. While both experiments used exactly the same setup and hyperparameters, the apples to oranges experiment trained much faster compared to the photograph to Van Gogh style painting setup. This could be attributed to the large number of modes in the case of the second experiment, along with diversity in the training samples.
This ends our section on unpaired style transfer. Now we're going to explore some work relating to and branching off from both paired and unpaired style transfer.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Exploring Deepfakes by Bryan Lyon and Matt Tora(7343)
Robo-Advisor with Python by Aki Ranin(7246)
Offensive Shellcode from Scratch by Rishalin Pillay(5915)
Ego Is the Enemy by Ryan Holiday(4882)
Microsoft 365 and SharePoint Online Cookbook by Gaurav Mahajan Sudeep Ghatak Nate Chamberlain Scott Brewster(4627)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4412)
Python for ArcGIS Pro by Silas Toms Bill Parker(3987)
Elevating React Web Development with Gatsby by Samuel Larsen-Disney(3693)
Machine Learning at Scale with H2O by Gregory Keys | David Whiting(3401)
Learning C# by Developing Games with Unity 2021 by Harrison Ferrone(3251)
Speed Up Your Python with Rust by Maxwell Flitton(3214)
Liar's Poker by Michael Lewis(3191)
OPNsense Beginner to Professional by Julio Cesar Bueno de Camargo(3177)
Extreme DAX by Michiel Rozema & Henk Vlootman(3154)
Agile Security Operations by Hinne Hettema(3107)
Linux Command Line and Shell Scripting Techniques by Vedran Dakic and Jasmin Redzepagic(3096)
Essential Cryptography for JavaScript Developers by Alessandro Segala(3067)
Cryptography Algorithms by Massimo Bertaccini(2983)
AI-Powered Commerce by Andy Pandharikar & Frederik Bussler(2968)
