tensor flow 之學習 (1)
- 上python 官網 down 3.5.x 版本 installer
- 係vs code 裝返 python 既 extension
- configure vs code setting
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "{YOURPATHFOR}/python.exe",
"program": "${file}",
"cwd": "{YOURPATHFOR}",
"env": {},
"envFile": "${workspaceRoot}/.env",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
},
- 跟住 To install TensorFlow, start a terminal. Then issue the appropriate pip3 install command in that terminal. To install the CPU-only version of TensorFlow, enter the following command:
C:\> pip3 install --upgrade tensorflow
To install the GPU version of TensorFlow, enter the following command:C:\> pip3 install --upgrade tensorflow-gpu
- open a file hello.py
import tensorflow as tf
print('hello')hello = tf.constant('Hello, TensorFlow!')sess = tf.Session()print(sess.run(hello))- then runt the code .
- result
留言
張貼留言