- 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')
])
推薦閱讀
- Aftershot Pro:Non-destructive photo editing and management
- 新型電腦主板關(guān)鍵電路維修圖冊
- 電腦維護(hù)與故障排除傻瓜書(Windows 10適用)
- Mastering Delphi Programming:A Complete Reference Guide
- Linux運(yùn)維之道(第2版)
- 基于ARM的嵌入式系統(tǒng)和物聯(lián)網(wǎng)開發(fā)
- 精選單片機(jī)設(shè)計(jì)與制作30例(第2版)
- 嵌入式系統(tǒng)設(shè)計(jì)教程
- 微服務(wù)分布式架構(gòu)基礎(chǔ)與實(shí)戰(zhàn):基于Spring Boot + Spring Cloud
- 電腦高級維修及故障排除實(shí)戰(zhàn)
- Source SDK Game Development Essentials
- 微型計(jì)算機(jī)系統(tǒng)原理及應(yīng)用:國產(chǎn)龍芯處理器的軟件和硬件集成(基礎(chǔ)篇)
- STM32自學(xué)筆記
- Building Machine Learning Systems with Python
- Drupal Rules How-to