Head First Tensorflow

Author: Yue-Wen FANG,

Contact: fyuewen@gmail.com

Revision history: created in 23th, August 2017, at New York Uniersity, Shanghai

New York University, Shanghai

Kyto University

The purpose of this simple tutorial is to pave a simple way to mchine learning and the application of tensorflow.

1. An introduction to machine learning and deep learning


In [ ]:

2. Tensorflow environment

Tensorflow is a multiple terminals, and Jiaxuan Li's book maily introduceds the version on Mac. For more details, we can refer to the official webpage of tersorflow.

2.1. Installation

Li's book recommends to instaill "virtualenv". This is a sand box.

As for myself, conda is my favoriate environment. Hence, I prefer installing tensorflow by the commands of conda. The details can be found here.


In [ ]:
conda create -n tensorflow1.3
source activate tensorflow1.3
pip install --ignore-installed --upgrade \
https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.3.0-cp34-cp34m-linux_x86_64.whl
#more details can be found https://www.tensorflow.org/install/install_linux#installing_with_anaconda
pip install matplotlib --upgrade pip install jupyter --upgrade (#Note that most people like to display jupyter notebook in a broswer, however, I cannot install any browser in my supercomputer, hence, I have to use hydrogen based on atom, which can use the kernel of jupyter. Ref: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-jupyter-notebook-to-run-ipython-on-ubuntu-16-04 https://atom.io/packages/hydrogen https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md) pip install scikit-image --upgrade (#This is used for processing figures) pip install librosa --upgrade (#for audio) pip install nltk --upgrade (#natural language, NER) pip install keras --upgrade pip install git+https://github.com/tflearn/tflearn.git

3. The visualization in Tensorflow

3.1 PlayGround