What better way to start getting into TensorFlow than with a notebook technology like Jupyter, the successor to IPython Notebook? There are two little hurdles to achieve this:
- Choice of OS. Trying to use Windows with TensorFlow is as painful as trying to use Windows with Spark. But even within Linux, it turns out you need a recent version. CentOS 7 works a lot better than CentOS 6 because it has a more recent glibc.
- A step is missing from the TensorFlow installation page. From StackOverflow:
conda install notebook ipykernel
- Use CentOS 7.2 (aka 1511), for example using VirtualBox if under Windows. This step may be unnecessary if you use OSX, but I just haven't tried it.
- Download and install Anaconda for Python 3.5.
- From the TensorFlow installation instructions:
conda create -n tensorflow python=3.5
source activate tensorflow
conda install -c conda-forge tensorflow - From StackOverflow:
conda install notebook ipykernel - Launch Jupyter:
jupyter notebook - Create a notebook and type in Hello World:
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
No comments:
Post a Comment