- 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')
])
推薦閱讀
- 零點起飛學Xilinx FPG
- Intel FPGA/CPLD設計(基礎篇)
- Instant uTorrent
- Deep Learning with PyTorch
- Learning Game Physics with Bullet Physics and OpenGL
- 基于Apache Kylin構建大數據分析平臺
- 筆記本電腦維修實踐教程
- Spring Cloud微服務和分布式系統實踐
- Managing Data and Media in Microsoft Silverlight 4:A mashup of chapters from Packt's bestselling Silverlight books
- 新編電腦組裝與硬件維修從入門到精通
- Intel FPGA權威設計指南:基于Quartus Prime Pro 19集成開發環境
- FreeSWITCH Cookbook
- FPGA實戰訓練精粹
- UML精粹:標準對象建模語言簡明指南(第3版)
- Nagios系統監控實踐(原書第2版)