一些些的code、一點點的Life,這就是生活。
因為我們pip沒有安裝(你可能已經有裝了拉,我是乾淨系統,所以預設是沒有的)
1 | sudo apt install python-pip |
裝好後,在下指令安裝GPU版的tensorflow
1 | pip install tensorflow-gpu==1.4 |
最後測試
$ python
…
>>> import tensorflow as tf
>>> hello = tf.constant(‘Hello, TensorFlow!’)
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42
>>>
一個不務正業,甚麼科技產品都玩的網路宅宅。 If you want to find me,that's easy! I will always on the Internet. so just find me, follow me. I will show you everything fun.