Skip to Main Content
Python Deep Learning Projects
book

Python Deep Learning Projects

by Matthew Lamons, Rahul Kumar, Abhishek Nagaraja
October 2018
Intermediate to advanced content levelIntermediate to advanced
472 pages
10h 57m
English
Packt Publishing
Content preview from Python Deep Learning Projects

Training loop

Now we are at the most important part of the code; the part where all of the functions we previously defined will be used. The following are the steps:

  1. Load the generator by calling the img_generator() function. 
  2. Load the discriminator by calling the img_discriminator() function and compile it with the binary cross-entropy loss and optimizer as optimizer_d, which we have defined under the hyperparameters section.
  3. Feed the generator and the discriminator to the dcgan() function and compile it with the binary cross-entropy loss and optimizer as optimizer_g, which we have defined under the hyperparameters section.
  4. Create a new batch of original images and masked images. Generate new fake images by feeding the batch of masked images ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Python Deep Learning for the Web

Hands-On Python Deep Learning for the Web

Anubhav Singh, Sayak Paul

Publisher Resources

ISBN: 9781788997096Supplemental Content