Skip to Content
机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)
book

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

by Aurélien Géron
October 2020
Intermediate to advanced
693 pages
16h 26m
Chinese
China Machine Press
Content preview from 机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)
训练深度神经网络
315
公式 11-8Adam 算法
1. 
m
β
1
m
1
β
1
θ
J
(
θ
)
2. 
s
β
2
s
+1
β
2
θ
J
(
θ
)
θ
J
(
θ
)
3. 
m
^
m
1
β
1
t
4. 
s
^
s
1
β
2
t
5. 
θ
θ
ηm
^
s
^
+
ε
在此等式中,
t
表示迭代次数(从 1 )。
如果只看步骤 12 5,你会发现 Adam 与动量优化和 RMSProp 非常相似。唯一的区
别是步骤 1 计算的是指数衰减的平均值,而不是指数衰减的总和,但除了常数因子(衰
减平均值是衰减总和的 1–
β
1
倍)外,它们实际上是等效的。第 3 步和第 4 步在技术上有
些细节:由于
m
s
初始化为 0,因此在训练开始时它们会偏向 0,这两个步骤将有助
于在训练开始时提高
m
s
动量衰减超参数
β
1
通常被初始化为 0.9,而缩放衰减超参数
β
2
通常被初始化为 0.999
如前所述,平滑项
ε
通常会初始化为一个很小的数字,例如 10
–7
。这些是 Adam 类的
默认值(准确地说,epsilon 的默认值为 None,它告诉 Keras 使用 keras.backend.
epsilon(),默认值为 10
–7
。你可以使用 keras.backend.set_epsilon() 来改
变)。这是使用 Keras 来创建 Adam 优化器的方法:
optimizer = keras.optimizers.Adam(lr=0.001, beta_1=0.9, beta_2=0.999)
由于 Adam 是一种自适应学习率算法(如 AdaGrad ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

算法技术手册(原书第2 版)

算法技术手册(原书第2 版)

George T.Heineman, Gary Pollice, Stanley Selkow
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey

Publisher Resources

ISBN: 9787111665977