1. TensorFlow導入
1-1. Python 3.6
まずはTensorFlowが動く環境を整えるため、
Python 3.6をインストールする。
ダウンロードするためのリポジトリを準備。
sudo yum install ius-release-1.0-15.ius.centos7.noarch.rpm
Python 3.6をインストール。
sudo yum install python36.x86_64
TensorFlowをダウンロードするためのpipをインストール。
sudo python3.6 -m ensurepip
sudo python3.6 -m ensurepip --upgrade
1-2. TensorFlow
本体を入れていきます。
sudo python3.6 -m pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.6.0-cp36-cp36m-linux_x86_64.whl
2. 動作確認
下記コマンドを打ち込んでpython入力モードへ切り替える。
python3.6
import tensorflow as tf
hello = tf.constant('Hello World')
sess = tf.Session()
print(sess.run(hello))
Hello Worldと表示される。