Setting up the project

We have already cloned/downloaded the complete code for all the chapters. The downloaded code contains a directory called Chapter04, 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 Chapter04:
cd Chapter04
  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 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 the requirements 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 be working with the dataset, including downloading it and cleaning it.

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

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