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

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')
])
主站蜘蛛池模板: 普洱| 孟村| 新龙县| 克什克腾旗| 息烽县| 青州市| 巴马| 昔阳县| 北宁市| 铜梁县| 绥德县| 武山县| 五原县| 南皮县| 昂仁县| 河西区| 山东| 富锦市| 义乌市| 常山县| 类乌齐县| 房山区| 綦江县| 平定县| 麦盖提县| 荆门市| 浦江县| 阳春市| 惠来县| 麟游县| 潜山县| 聂荣县| 大新县| 克拉玛依市| 惠水县| 资溪县| 绵阳市| 芮城县| 山东省| 湛江市| 开江县|