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

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)
主站蜘蛛池模板: 苍梧县| 辽阳市| 凌海市| 长武县| 吉安市| 靖州| 武陟县| 穆棱市| 临沧市| 石河子市| 视频| 台中市| 宣化县| 绥中县| 铅山县| 汪清县| 盐城市| 崇义县| 泰兴市| 连云港市| 许昌县| 安远县| 黎川县| 南通市| 卓资县| 乐亭县| 南通市| 东城区| 饶平县| 瑞昌市| 潞城市| 永德县| 个旧市| 公安县| 临江市| 丰原市| 潜山县| 罗甸县| 长泰县| 贵定县| 大同县|