博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Learning TensorFlow Note-103
阅读量:6243 次
发布时间:2019-06-22

本文共 2021 字,大约阅读时间需要 6 分钟。

What is Gradient Descent

Gradient descent is a first-order iterative optimization algorithm for finding the minimum of a function. To find a local minimum of a function using gradient descent, one takes steps proportional to the negative of the gradient (or of the approximate gradient) of the function at the current point.

Quoted from

Take a simple instance

Now,We have a One-dimensional function

$$ f(x)=(x-1)^2-2 $$
The graph may looks like this
图片描述

How using a traditional mathematical way to find the minimum of this function?

Of course,In this Instance you also could using graph find the minimum directly,But we don't talk about it.

We are going to get derivative of this function.

derivative:
$$ \nabla f(x)= 2(x-1) $$
Then let the derivative of this function equal 0.

$$ 0=2(x-1) $$

We will find that when X equal = 1,we get the minimum of this function.

How does the Gradient Descent work

In this instance,One-dimensional function,The Gradient Descent optimization algorithm will change the X value continuously, reducing the value of function.

Let's take a simulation

We let the X start at value equal -1

$$ x_{0}= -1 $$

$$ \nabla f(x_{0})= 2(x_{0}-1) $$

How let the X value changing continuously, makes value of function getting closer to minimum.

Now we are going to focus on the derivative of this function

We know that when the derivative of function equal 0,will get a minimum or maximum of function

When the derivative of function > 0,value of function is going to increase continuously.
When the derivative of function < 0,value of function is going to decrease continuously.

let me give you a simple example

图片描述

When our derivative of function gets closer to minimum or maximum, the value of derivative will smaller.

Then we can just let next value of X equal :

$$ x_{1}= x_{0}-\gamma*\nabla f(x_{0}) $$

$$ \gamma $$

The gamma is called learning rate ,controlling the speed of value changing, We will talk about it later.

How about multidimensional functions? That's a good question,Let's talk about it later.

图片描述

转载地址:http://aapia.baihongyu.com/

你可能感兴趣的文章
学艺不精 - 记一次性能问题排查
查看>>
Provisioning Services 7.6 入门到精通系列之五:PVS控制台安装
查看>>
awk工具
查看>>
设计模式-代理模式(Proxy)
查看>>
Windows Sharepoint services 3.0部署体验
查看>>
[分享] Mac 键盘和Pc键盘对照表
查看>>
windows下批量杀死进程
查看>>
第七章:面向对象(三)
查看>>
android-ripple-background
查看>>
我的友情链接
查看>>
编译安装Apache服务要点
查看>>
Arrays.copy()和ArrayList.clone()
查看>>
mosquitto安装、配置、测试、paho.mqtt-spy安装
查看>>
我的友情链接
查看>>
Eclispe 安装插件 Properties Editor
查看>>
ReactiveCocoa RACDelegateProxy
查看>>
网站架构案例精解
查看>>
iOS提示框,为什么你应该使用 MBProgressHUD?
查看>>
思科GLC-T、GLC-TE与SFP-GE-T电模块的区别
查看>>
Spring AOP 的 afterReturing 为什么不能改变返回值
查看>>