- Hands-On Deep Learning Architectures with Python
- Yuxi (Hayden) Liu Saransh Mehta
- 88字
- 2021-06-24 14:48:15
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)
推薦閱讀
- 繪制進程圖:可視化D++語言(第1冊)
- 火格局的時空變異及其在電網防火中的應用
- 數據中心建設與管理指南
- 自動化控制工程設計
- OpenStack Cloud Computing Cookbook
- 單片機C語言應用100例
- Python:Data Analytics and Visualization
- 單片機C語言程序設計完全自學手冊
- PowerMill 2020五軸數控加工編程應用實例
- Learn Microsoft Azure
- Advanced Deep Learning with Keras
- 數字多媒體技術與應用實例
- 超好玩的Python少兒編程
- PowerPoint 2003中文演示文稿5日通
- R Statistics Cookbook