Skip to Content
精通機器學習
book

精通機器學習

by Aurélien Géron
April 2020
Intermediate to advanced
816 pages
18h 32m
Chinese
GoTop Information, Inc.
Content preview from 精通機器學習
394
|
第十二章:用 TensorFlow 來自製模型和進行訓練
如果你設定優化法的
clipnorm
clipvalue
超參數
它會幫你處理這些事
如果你想要對
梯度套用任何其他轉換
只要在呼叫
apply_gradients()
方法之前做這件事即可
如果你對模型加入權重約束
例如在建立階層時設定
kernel_constraint
bias_
constraint
),
你要在執行
apply_gradients()
之後更新訓練迴圈來套用這些約束
for
variable
in
model.variables:
if
variable.constraint
is not
None:
variable.assign(variable.constraint(variable))
最重要的是
這個訓練迴圈不處理在訓練和測試期間有不同行為的階層
例如
BatchNormalization
Dropout
),
若要處理它們
你必須用
training=True
來呼叫模型
來讓模型將它傳播給需要它的每一個階層
如你所見
你必須把很多事情做對
而且很容易犯錯
但是從光明面看
你可以完全控制
局面
所以決定權在你
知道如何自訂模型的任何部分
14
以及訓練演算法之後
我們來瞭解如何使用
TensorFlow
的自動圖產生功能
它可以大幅提升自訂程式碼的速度
而且可以讓程式碼移植到
TensorFlow
支援的任何平台
見第
19
)。
TensorFlow
函式與圖
TensorFlow 1
圖是不可避免的
以及隨之而來的複雜性 ...
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

下一代空间计算:AR与VR创新理论与实践

下一代空间计算:AR与VR创新理论与实践

Erin Pangilinan, Steve Lukas, Vasanth Mohan
C语言核心技术(原书第2版)

C语言核心技术(原书第2版)

Peter Prinz, Tony Crawford

Publisher Resources

ISBN: 9789865024345