Setting up the project

If you haven't already cloned the repository with the complete code for all chapters, clone the repository now. The cloned repository has a directory called Chapter09, which contains the entire code for this chapter. Execute the following commands to set up the project:

  1. Start by navigating to the parent directory as follows:
cd Generative-Adversarial-Networks-Projects
  1. Now change the directory from the current directory to Chapter09:
cd Chapter09
  1. Next, create a Python virtual environment for this project: 
virtualenv venv
virtualenv venv -p python3 # Create a virtual environment using python3 interpreter
virtualenv venv -p python2 # Create a virtual environment using python2 interpreter

We will be using this newly created virtual environment for this project. Each chapter has its own separate virtual environment.

  1. Next, activate the newly created virtual environment:
source venv/bin/activate

After you activate the virtual environment, all further commands will be executed in this virtual environment.

  1. Next, install all libraries given in the requirements.txt file by executing the following command:
pip install -r requirements.txt

You can refer to the README.md file for further instructions on how to set up the project. Very often, developers face the problem of mismatching dependencies. Creating a separate virtual environment for each project will take care of this problem.

In this section, we have successfully set up the project and installed the required dependencies. In the next section, we will work on the dataset. We will now explore the various steps required to download and format the dataset.

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

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