Book Image

Python Deep Learning Projects

By : Matthew Lamons, Rahul Kumar, Abhishek Nagaraja
Book Image

Python Deep Learning Projects

By: Matthew Lamons, Rahul Kumar, Abhishek Nagaraja

Overview of this book

Deep learning has been gradually revolutionizing every field of artificial intelligence, making application development easier. Python Deep Learning Projects imparts all the knowledge needed to implement complex deep learning projects in the field of computational linguistics and computer vision. Each of these projects is unique, helping you progressively master the subject. You’ll learn how to implement a text classifier system using a recurrent neural network (RNN) model and optimize it to understand the shortcomings you might experience while implementing a simple deep learning system. Similarly, you’ll discover how to develop various projects, including word vector representation, open domain question answering, and building chatbots using seq-to-seq models and language modeling. In addition to this, you’ll cover advanced concepts, such as regularization, gradient clipping, gradient normalization, and bidirectional RNNs, through a series of engaging projects. By the end of this book, you will have gained knowledge to develop your own deep learning systems in a straightforward way and in an efficient way
Table of Contents (17 chapters)
8
Handwritten Digits Classification Using ConvNets

Automating the setup process

Installing of Python packages and DL libraries can be a tedious process, requiring lots of time and repetitive effort. So, to ease the job, we will create a bash script that can be used to install everything using a single command.

The following is a list of components that will get installed and configured:

  • Java 8
  • Bazel for building
  • Python and associated dependencies
  • TensorFlow
  • Keras
  • Git
  • Unzip
  • Dependencies for all of the aforementioned services (see the script for exact details)

You can simply download the automation script to your server or locally, execute it, and you're done. Here are the steps to follow:

  1. Save the script to your home directory, by cloning the code from the repository:
git clone https://github.com/PacktPublishing/Python-Deep-Learning-Projects
  1. Once you have the copy of the complete repository, move to the Chapter01 folder, which will contain a script file named setupDeepLearning.sh. This is the script that we will execute to start the setup process, but, before execution, we will have to make it executable using the chmod command:
cd Python-Deep-Learning-Projects/Chapter01/
chmod +x setupDeepLearning.sh
    1. Once this is done, we are ready to execute it as follows:
    ./setupDeepLearning.sh

    Follow any instructions that appear (basically, say yes to everything and accept Java's license). It should take about 10 to 15 minutes to install everything. Once it has finished, you will see the list of Python packages being installed, as shown in the following screenshot:

    Listed packages with TensorFlow and other Python dependencies

    There are a couple of other options, too, such as getting Docker images from TensorFlow and other DL packages, which can set up fully functional DL machines for large-scale and production-ready environments. You can find out more about Docker at https://www.docker.com/what-docker. Also, for a quick-start guide, follow the instructions on this repository for an all-in-one Docker image for DL at https://github.com/floydhub/dl-docker.