官术网_书友最值得收藏!

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')
])
主站蜘蛛池模板: 三明市| 顺昌县| 越西县| 久治县| 上犹县| 南丰县| 都昌县| 安多县| 大洼县| 临朐县| 阳江市| 呼和浩特市| 醴陵市| 诏安县| 陵水| 宜宾县| 尉氏县| 镇赉县| 宁陵县| 乐昌市| 探索| 揭西县| 清镇市| 伊宁县| 松桃| 湟源县| 安平县| 和政县| 栖霞市| 临桂县| 微山县| 锦州市| 寿宁县| 宝兴县| 潢川县| 繁峙县| 司法| 灵石县| 大宁县| 南丹县| 泸水县|