Post date: 2017/11/08 11:05:19
1. Install
$ sudo apt-get install python3-pip python3-dev python-virtualenv2. 起動
$ virtualenv --system-site-packages -p python3 ~/tensorflow$ source ~/tensorflow/bin/activate(tensorflow)$ easy_install -U pip(tensorflow)$ pip3 install --upgrade tensorflowSuccessfully installed bleach-1.5.0 enum34-1.1.6 html5lib-0.9999999 markdown-2.6.9 numpy-1.13.3 protobuf-3.4.0 six-1.11.0 tensorflow-1.4.0 tensorflow-tensorboard-0.4.0rc2 werkzeug-0.12.23. test
$ python Python 3.5.2 (default, Sep 14 2017, 22:51:06 [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow as tf >>> hello = tf.constant('Hello, TensorFlow!') >>> sess = tf.Session() 2017-11-08 20:01:15.008675: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA >>> print(sess.run(hello)) b'Hello, TensorFlow!' >> >>> from tensorflow.examples.tutorials.mnist import input_data >>> mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes. Extracting MNIST_data/train-images-idx3-ubyte.gz Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes. Extracting MNIST_data/train-labels-idx1-ubyte.gz Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes. Extracting MNIST_data/t10k-images-idx3-ubyte.gz Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes. Extracting MNIST_data/t10k-labels-idx1-ubyte.gz >>>
Ref: