2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

TensorFlowで機械学習を試してみた

Last updated at Posted at 2018-03-22

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と表示される。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?