- 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)
推薦閱讀
- 并行數據挖掘及性能優化:關聯規則與數據相關性分析
- 手把手教你學AutoCAD 2010
- 程序設計語言與編譯
- 四向穿梭式自動化密集倉儲系統的設計與控制
- INSTANT Drools Starter
- Machine Learning with Apache Spark Quick Start Guide
- 零起點學西門子S7-200 PLC
- 智能鼠原理與制作(進階篇)
- Data Science with Python
- 中老年人學數碼照片后期處理
- Hands-On Data Analysis with Scala
- Mastering Kubernetes
- 中文版Photoshop CS6數碼照片處理高手速成
- 嵌入式系統應用開發基礎
- iPhone Game Blueprints