I would like to record my learning process of Tensorflow on this blog to remind myself!
tool
lenovo G50-80 Xiaobawang machine, Ubuntu18.04 , python 3.6.8 tensorflow 1.14CPU version
Install Tensorflow
Open terminal input
pip3 install tensorflow
After installation, enter python3 in the terminal
python
If import tensorflow does not report an error, the installation is successful,
import tensorflow as tf
Concepts in Tensorflow
Here I refer to the video of Mofan python . If you are interested, you can learn about it.
Session
Session is a statement used to control the execution result of a file in Tensorflow, and the result of the operation is obtained through Session.run().
Session has two forms of control
sess = tf.Session()
...
sess.close()
```
with tf.Session() as sess:
...
```
Variable
Variable used to define variables is different from python. Tensorflow must use Variable to define variables, and variables are variables.
import tensorflow as tf
state = tf.Variable()
placeholder
Placeholder is a placeholder in Tensorflow, which is actually used for reading from the keyboard. If Tensorflow wants to read data from the outside, you need to use tf.placeholder()
Excitation function
The activation function is to solve the nonlinear problem in the neural network. Brief introduction