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

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)
主站蜘蛛池模板: 大埔县| 鲁甸县| 河南省| 清涧县| 若尔盖县| 平昌县| 宝丰县| 锡林郭勒盟| 德安县| 延长县| 来凤县| 太和县| 吐鲁番市| 梧州市| 邮箱| 巨野县| 开远市| 宁武县| 贵定县| 怀柔区| 孙吴县| 正阳县| 山西省| 岳阳市| 沛县| 苍溪县| 镇安县| 农安县| 宜阳县| 宁远县| 雅安市| 庄浪县| 西藏| 阿拉善盟| 郯城县| 潼南县| 江安县| 日喀则市| 正安县| 沧源| 双柏县|