Getting ready

Remember that folder we created earlier in this chapter? You will want to create three new files in this folder. Here are the files you need to create in this folder (you can use the Linux command touch filename.py to create them):

  • generator.py
  • discriminator.py
  • gan.py

After creating these files, your directory structure should look like this inside of the full-gan folder:

full-gan/
├── discriminator.py
├── Dockerfile
├── gan.py
├── generator.py
└── run.sh

We've got all the right files in our directory, so now it's time to start adding code to each of these files. The discriminator.py file is the first file we will populate with code. We're going to go through each block of code piece by piece. The goal of this recipe is to understand the core components of this basic discriminator. In future recipes, we will use much more complex representations of the discriminator and in some cases, multiple discriminators to improve the performance of these structures. Remember, it can be hard for these models to converge without some tuning.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.19.243