Pythonの深層学習モジュール「TensorFlow」を用いて、Hello Worldする方法についてソースコード付きでまとめました。
TensorFlowで「Hello World」
Pythonの深層学習モジュール「TensorFlow」で、動作確認も兼ねてHello Worldしてみます。
サンプルコード(Python)
サンプルプログラムのソースコードです。
# -*- coding:utf-8 -*-
import tensorflow as tf
hello = tf.constant('Hello World!')
s = tf.Session()
print(s.run(hello))
実行結果
2018-08-15 23:23:22.644328: I C:\tf_jenkins\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 b'Hello World!'
| – | 関連記事 |
|---|---|
| 1 | ■【Python/TensorFlow入門】ディープラーニングの使い方 |
| 2 | ■【機械学習入門】アルゴリズム&プログラミング |
| 3 | ■Python入門 基本文法 |

コメント