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

Functional API

This is just another layout for coding the model graph. You can choose the following layout if you are more comfortable with Python style code writing:

from keras.models import Model
from keras.layers import Dense, Input

#defining input placeholder with input shape
inp = Input(shape = 100)

# layers
x = Dense(units = 128, activation = 'relu')
x = Dense(units = 64, activation = 'relu')

# taking output
predict = Dense(units = 4, activation = 'softmax')(x)

# defining model
model = Model(inputs = inp, outputs = predict)
主站蜘蛛池模板: 洮南市| 皮山县| 社旗县| 荆门市| 广西| 托克逊县| 堆龙德庆县| 长治市| 淮阳县| 枝江市| 德钦县| 左贡县| 清新县| 永定县| 万安县| 怀远县| 乌兰察布市| 温州市| 广西| 重庆市| 寿宁县| 利津县| 锡林郭勒盟| 遵义县| 吴旗县| 诸城市| 泸州市| 威信县| 信丰县| 峨眉山市| 沙河市| 鲁山县| 天津市| 湛江市| 麻栗坡县| 双城市| 手游| 尉氏县| 道孚县| 武乡县| 襄城县|