Anaconda, Jupyter Notebook, TensorFlow and Keras for Deep Learning
[Update: you no longer need to install Keras separately since it is part of the core TensorFlow API. “import tensorflow as tf” then use tf.keras in your code. You will notice the strikethrough of any mention of Keras installation in this blog post]
So you want to get started to study deep learning? The first step is to set up the tools. In this post I will share with you how to set up Anaconda and Jupyter Notebook, and then install TensorFlow (including Keras). Check out My Notes on TensorFlow 2.0 if you want to try out the 2.0 Preview.
There are different ways of installing TensorFlow:
- “native” pip or install from source
- install in a virtual environment with Virtualenv, Anaconda, or Docker. This post will be using Anaconda.
While Jupyter Notebook is not a pre-requisite for using TensorFlow (or Keras), I find that using Jupyter Notebook very helpful for beginners who just started with machine learning or deep learning. I plan to use Jupyter Notebook for all the tutorials that I will be writing in order to share my deep learning knowledge.
There are other deep learning frameworks out there but my future tutorials will be mostly using TensorFlow and tf.keras.
Let’s get started -
Anaconda will enable you to create virtual environments and install packages needed for data science and deep learning. With virtual environments you can install specific package versions for a particular project or a tutorial without worrying about version conflicts.
Download Anaconda for your platform and choose the Python 3.6 version: https://www.anaconda.com/download
By downloading Anaconda, you get conda, Python, Jupyter Notebook and hundreds of other open source packages.
Conda is a package manager to manage virtual environment and install packages. Here are some helpful commands using conda:
# update conda in your default environment
$ conda upgrade conda
$ conda upgrade --all# create a new environment with conda
$ conda create -n [my-env-name]
$ conda create -n…