MNIST はじまりました
やっとこさ始めることができました、MNIST。
まずはこれが理解できないと始まらないので・・・
これさえも動かない状態が続いていたので、やっと光が見えた感じです。
まずはinput_dataでerrorとなりつまずきました。
ここは修正することで何とか切り抜けて、以下のようにlogが取れるまでになりました。
あー長かったorz
直したところは↓ここ。
import input_data
これを
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('MNIST_data', one_hot=True)
これでエラー解消
ではやってみましょう。
:~$ python3 mn1.py
Extracting MNIST_data/train-images-idx3-ubyte.gz
Extracting MNIST_data/train-labels-idx1-ubyte.gz
Extracting MNIST_data/t10k-images-idx3-ubyte.gz
Extracting MNIST_data/t10k-labels-idx1-ubyte.gz
2017-06-18 07:33:39.264680: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-18 07:33:39.313121: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-18 07:33:39.313275: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
WARNING:tensorflow:From /home/tatsu/.pyenv/versions/3.5.2/lib/python3.5/site-packages/tensorflow/python/util/tf_should_use.py:170: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
0.9144
WARNING:tensorflow:From /home/tatsu/.pyenv/versions/3.5.2/lib/python3.5/site-packages/tensorflow/python/util/tf_should_use.py:170: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
step 0, training accuracy 0
step 100, training accuracy 0.78
step 200, training accuracy 0.94
step 300, training accuracy 0.94
step 400, training accuracy 0.92
step 500, training accuracy 0.98
step 600, training accuracy 0.94
step 700, training accuracy 1
step 800, training accuracy 0.96
step 900, training accuracy 0.94
step 1000, training accuracy 0.94
step 1100, training accuracy 0.88
step 1200, training accuracy 0.98
step 1300, training accuracy 1
step 1400, training accuracy 0.98
step 1500, training accuracy 1
step 1600, training accuracy 1
step 1700, training accuracy 0.96
本日はこれが終わるまでで終了。
PC再設定 tensorflow用
64ビットじゃないとだめらしいというのを見つけたので再インストールとなりました。
ここでも転んだので備忘録
vmwareでubuntu64ビットを入れるのですが、結局日本語版がインストールできませんでした。なので英語版を入れて日本語化させています。
お世話になったのはこちら
https://www.server-world.info/query?os=Ubuntu_16.04&p=japanese
日本語にしないとterminalでも記号を打つときにキーボードの印と合わないので苦労します。記号配列まで覚えられる人は良いですがね。
終わったら、昨日のリンク先の通りに実行したらtensorflowが動きました。
あー回り道した。
ちなみにpythonは3.5.2を入れました。
PCでtensorflowの準備・・・
昨夜installしたtensorflowですが、うまく動きません。
なので、やり直し。
$ sudo apt-get update
$ sudo apt-get install -y git build-essential libssl-dev language-pack-id
pyenvでPythonをインストールするときにロケールが設定されていないと、エラーが出ることがあるので先に設定しておこう。
$ export LC_ALL=C
$ sudo dpkg-reconfigure locales
ロケールはALLを選んでしまった・・・ので、失敗だったかも。
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init -)"' >> ~/.bashrc
$ exec $SHELL
$ pyenv install 3.4.2
テンソルフローは3.4.2だったように記憶しているので・・・
が、しかし!tensorflowは3.5でしかも64bit版しか対応していなそうな。
最初に戻ってやりなおし。Ubuntuから入れ直しです(涙
教材変更・・・
こちらの言うとおりwaveioを入れることにしました。
scikits.audiolabにしようと思ったのですが、バージョンが3.4に対応していないそうなので却下。
/ChromagramSample
をパクろうと思ったのですが、別の教材を探してみます。
本日時間切れでここまで
この前の結果
中途半端な結果