- Mastering TensorFlow 1.x
- Armando Fandango
- 82字
- 2021-06-25 22:51:03
Sequential API for creating the Keras model
In the sequential API, create the empty model with the following code:
model = Sequential()
You can now add the layers to this model, which we will see in the next section.
Alternatively, you can also pass all the layers as a list to the constructor. As an example, we add four layers by passing them to the constructor using the following code:
model = Sequential([ Dense(10, input_shape=(256,)),
Activation('tanh'),
Dense(10),
Activation('softmax')
])
推薦閱讀
- 用“芯”探核:龍芯派開發(fā)實戰(zhàn)
- Instant uTorrent
- 網(wǎng)絡服務器配置與管理(第3版)
- 深入淺出SSD:固態(tài)存儲核心技術、原理與實戰(zhàn)
- 精選單片機設計與制作30例(第2版)
- 3ds Max Speed Modeling for 3D Artists
- Mastering Adobe Photoshop Elements
- 計算機電路基礎(第2版)
- Building Machine Learning Systems with Python
- USB應用分析精粹:從設備硬件、固件到主機端程序設計
- 嵌入式系統(tǒng)設計大學教程(第2版)
- The Reinforcement Learning Workshop
- 電腦主板維修技術
- FPGA進階開發(fā)與實踐
- 計算機組裝與維護立體化教程(微課版)