pyenv install

ここを参考にpyenvを入れました

pyenvを使ってMacにPythonの環境を構築する - Qiita http://qiita.com/1000ch/items/93841f76ea52551b6a97

$ git clone git://github.com/yyuu/pyenv.git ~/.pyenv

.bash_profileへ環境変数の追加の書き込み

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
$ pyenv install 3.4.1
$ pyenv rehash

tensor flow install

この辺見てやった

Tensor Flowを初心者なりに導入してみた - Qiita http://qiita.com/tamagokake_gohan/items/df969c9508d4593a9776

$ which pip3
# すでにpip3がpyenv管理下に入ってる

$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0-py3-none-any.whl
$ pip3 install --upgrade $TF_BINARY_URL

テスト実行

サンプルを実行してみる

$ TFPATH=`python -c 'import os; import inspect; import tensorflow; print(os.path.dirname(inspect.getfile(tensorflow)))'`
$ cd $TFPATH
$ python -m tensorflow.models.image.mnist.convolutional

Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.
Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
Initialized!
Step 0 (epoch 0.00), 4.0 ms
Minibatch loss: 12.054, learning rate: 0.010000
Minibatch error: 90.6%
Validation error: 84.6%
.....

その他URL

テンソルフローでMNISTのチュートリアル (Deep Leaning) | OpenBook https://openbook4.me/projects/238/sections/1553

GitHub - tensorflow/tensorflow: Computation using data flow graphs for scalable machine learning https://github.com/tensorflow/tensorflow

Recent Entries