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
About the Author
About the Reviewer
Customer Feedback

Connecting with Jupyter Notebooks on a server

As mentioned in the introduction, Notebooks have gained a lot of traction in the last couple of years. Notebooks are an intuitive tool for running blocks of code. When creating the Anaconda environment in the Installing Anaconda and Libraries recipe, we included Jupyter in our list of libraries to install. 

How to do it...

  1. If you haven't installed Jupyter yet, you can use the following command in your activated Anaconda environment on the server:
 conda install jupyter
  1. Next, we move back to the terminal on our local machine.
  1. One option is to access the Notebook running on a server using SSH-tunnelling. For example, when using Google Cloud Platform:
gcloud compute ssh --ssh-flag="-L 8888:localhost:8888"  --zone "europe-west1-b" "instance-name" 

You're now logged in to the server and port 8888 on your local machine will forward to the server with port 8888.

  1. Make sure to activate the correct Anaconda environment before proceeding (adjust the name of your environment accordingly):
source activate environment-deep-learning-cookbook
  1. You can create a dedicated directory for your Jupyter notebooks:
mkdir notebooks
cd notebooks
  1. You can now start the Jupyter environment as follows:
jupyter notebook

This will start Jupyter Notebook on your server. Next, you can go to your local browser and access the notebook with the link provided after starting the notebook, for example, http://localhost:8888/?token=1fa4e9aea99cd7be2b974557eee3d344ca3c992f5861834f.