TensorFlow on Fawkes
流行りに乗っかって,Fawkes でTebnsorFlow を使ってみようというコーナーです.
まずは,Fedora 23にTensorFlowをインストールします.
fedora23 に機械学習ライブラリ TensorFlow をインストールするを参照.
とりあえず,python,python-devel,rpm-build はインストール済でした.
export http_proxy=http://cache.st.ryukoku.ac.jp:8080; export https_proxy=$http_proxy pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
[root@fedoraMini ~]# python
Python 2.7.11 (default, Sep 29 2016, 13:33:00)
[GCC 5.3.1 20160406 (Red Hat 5.3.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow')
>>> sess = tf.Session()
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelism threads: 4
I tensorflow/core/common_runtime/local_session.cc:45] Local session inter op parallelism threads: 4
>>> print sess.run(hello)
Hello, TensorFlow
>>> exit()
先ほどのサイトに従ってインストールして動作確認したのが,上記です.
Interfaceの5月号を参照して実施するなら以下です.
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc2-cp27-none-linux_x86_64.whl
ただ,なんかprotobuf のバージョン辺りでエラーが出るので,一旦削除して,もう一度インストール.
Tensorflowがimportできないを参照.
[root@fedoraMini ~]# python
Python 2.7.11 (default, Sep 29 2016, 13:33:00)
[GCC 5.3.1 20160406 (Red Hat 5.3.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello World!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello World!
>>> exit()
jupyter notebook を使うには,pip でインストールしましょう.Jupyter Notebook(IPython)のインストールと始め方より.
pip install jupyter
コメントを残す