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 精通機器學習
Keras 來實作 MLP
|
293
你必須這樣修改
import
from tensorflow.keras.layers import
Dense
output_layer = Dense(10)
或直接使用完整路徑
如果你比較喜歡這樣做的話
from tensorflow import
keras
output_layer = keras.layers.Dense(10)
雖然這種做法比較繁瑣
但本書將會採用它
讓你知道我們使用哪一個程式包
並且避免你搞不清楚它究竟是標準類別還是自訂類別
在成品中
我比較喜歡
前者的做法
很多人也會先使用
from tensorflow.keras import layers
再使用
layers.Dense(10)
模型的
summary()
方法可顯示模型的每一層
14
包括每一層的名稱
這是自動產生的
非你在製作該層的時候設定它
)、
它的輸出外形
None
代表可為任何批次大小
),
以及它
的參數數量
這個摘要的結尾是參數的總數
包括可訓練的和不可訓練的參數
在此
們只有可訓練的參數
11
章會展示不可訓練的參數的例子
):
>>>
model.summary()
Model: "sequential"
_________________________________________________________________
Layer (type) Output Shape Param #
================================================================= ...
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