Book Image

Python Deep Learning Cookbook

By : Indra den Bakker
Book Image

Python Deep Learning Cookbook

By: Indra den Bakker

Overview of this book

Deep Learning is revolutionizing a wide range of industries. For many applications, deep learning has proven to outperform humans by making faster and more accurate predictions. This book provides a top-down and bottom-up approach to demonstrate deep learning solutions to real-world problems in different areas. These applications include Computer Vision, Natural Language Processing, Time Series, and Robotics. The Python Deep Learning Cookbook presents technical solutions to the issues presented, along with a detailed explanation of the solutions. Furthermore, a discussion on corresponding pros and cons of implementing the proposed solution using one of the popular frameworks like TensorFlow, PyTorch, Keras and CNTK is provided. The book includes recipes that are related to the basic concepts of neural networks. All techniques s, as well as classical networks topologies. The main purpose of this book is to provide Python programmers a detailed list of recipes to apply deep learning to common and not-so-common scenarios.
Table of Contents (21 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Installing Anaconda and libraries


One of the most popular environment managers for users is Anaconda. With Anaconda, it's straightforward to set up, switch, and delete environments. Therefore, one can run Python 2 and Python 3 on the same machine and switch between different installed versions of installed libraries if needed. In this book, we purely focus on Python 3 and every recipe can be run within one environment: environment-python-deep-learning-cookbook.

How to do it...

  1. You can directly download the installation file for Anaconda on your machine as follows (adjust your Anaconda file accordingly):
curl -O https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh
  1. Next, run the bash script (if necessary, adjust the filename accordingly):
bash Anaconda3-4.3.1-Linux-x86_64.sh

Follow all prompts and choose 'yes' when you're asked to to add the PATH to the .bashrc file (the default is 'no').

  1. Afterwards, reload the file:
source ~/.bashrc
  1. Now, let's set up an Anaconda environment. Let's start with copying the files from the GitHub repository and opening the directory:
git clone https://github.com/indradenbakker/Python-Deep-Learning-Cookbook-Kit.git
cd Python-Deep-Learning-Cookbook-Kit
  1. Create the environment with the following command:
conda env create -f environment-deep-learning-cookbook.yml
  1. This creates an named environment-deep-learning-cookbook and installs all libraries and dependencies included in the .yml file. All used in this book are included, for example, NumPy, OpenCV, Jupyter, and scikit-learn. 
  2. Activate the environment:
source activate environment-deep-learning-cookbook
  1. You're now ready to run Python. Follow the next recipe to install Jupyter and the deep learning frameworks used in this book.