- 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)
推薦閱讀
- 自動控制工程設(shè)計入門
- Design for the Future
- R Data Mining
- Getting Started with Oracle SOA B2B Integration:A Hands-On Tutorial
- Learning Apache Cassandra(Second Edition)
- Supervised Machine Learning with Python
- 大學(xué)計算機應(yīng)用基礎(chǔ)
- 大數(shù)據(jù)技術(shù)與應(yīng)用
- 影視后期編輯與合成
- Machine Learning with Apache Spark Quick Start Guide
- HTML5 Canvas Cookbook
- R Machine Learning Projects
- 電氣控制與PLC原理及應(yīng)用(歐姆龍機型)
- 簡明學(xué)中文版Photoshop
- Mastering Ansible(Second Edition)