Using LSTMs to generate new TV scripts with PyTorch.
This project is part of the requirements for the completion of the Udacity Deep Learning Nanodegree. It consists of training a recurrent neural network in this case LSTMs to generate scripts in the style of dialogue from Seinfeld using PyTorch.
-
Clone the repository and navigate to the downloaded folder.
git clone https://github.com/Saoussen-CH/RNN_TV_Script_Generation.git cd RNN_TV_Script_Generation
-
Make sure you have already installed the necessary Python packages according to the Dependecies section of the README.
-
Open a terminal window and navigate to the project folder. Open the notebook and follow the instructions.
jupyter notebook dlnd_tv_script_generation.ipynb
If you decide to reproduce the code and it is taking too long to run, you will need to either reduce the complexity of your chosen CNN architecture or switch to running your code on a GPU. You can use Google Colab for free GPU.
Download Anaconda
Linux | Mac | Windows | |
---|---|---|---|
64-bit | 64-bit (bash installer) | 64-bit (bash installer) | 64-bit (exe installer) |
32-bit | 32-bit (bash installer) | 32-bit (exe installer) |
Install Anaconda on your machine. Detailed instructions:
Please go though this doc before you creating an environment. After that create a environment using following command
conda create --name deep-learning
Then activate the environment using following command
activate deep-learning
These instructions also assume you have git
installed for working with Github from a terminal window, but if you do not, you can download that first with the command:
conda install git
Now, you can create a local version of the project
- Clone the repository, and navigate to the downloaded folder. This may take a minute or two to clone due to the included image data.
git clone https://github.com/Saoussen-CH/RNN_TV_Script_Generation.git
cd RNN_TV_Script_Generation
-
Install PyTorch and torchvision; this should install the latest version of PyTorch.
- Linux or Mac:
conda install pytorch torchvision -c pytorch
- Windows:
conda install pytorch -c pytorch pip install torchvision
-
Install a few required pip packages, which are specified in the requirements text file (including OpenCV).
pip install -r requirements.txt
- That's it!, Now run the project using following command, check you default browser and open dlnd_tv_script_generation.ipynb file
jupyter notebook