Tensorflow introduction and practice (basic knowledge)-overview and univariate linear regression

table of Contents

Foreword:

TensorFlow

Univariate linear regression:

Loss function

Implementation process

Gradient descent method:

For example


Foreword:

TensorFlow

At present, Tensorflow is the most used framework in the world and the largest community . Because Google is produced, it is maintained and updated frequently, and it has a Python C++ interface and a very complete tutorial.

Because its language is too low-level , there are currently many Tensorflow-based 20,000 abstract libraries that encapsulate the functions of Tensorflow to make it simple.

But after TF2.0 was released in 19, everything became much easier

Mainly a familiar application of the framework

Univariate linear regression:

Loss function

Absolute value calculating inconvenient to use, and therefore uses the average variance

Implementation process

First guess a, b, but such efficiency is inappropriate at the bottom.

Therefore, we use gradient descent

Gradient descent method:

Find the mechanism of the loss function

for example

  • Random initialization
  • Randomly initialize a batch of points in the deep learning network
  • Gradient is to find the direction of the minimum

In the theoretical part, just look at the previous machine learning notes .

Find along the direction of the derivative, the stride will affect the rate of decline,

In deep learning, the local optimal solution is never a problem. Simply put, it will have multiple values

 

Guess you like

Origin blog.csdn.net/qq_37457202/article/details/107745072