- Mastering TensorFlow 1.x
- Armando Fandango
- 83字
- 2021-06-25 22:50:59
Creating the TFLearn Layers
Let us learn how to create the layers of the neural network models in TFLearn:
- Create an input layer first:
input_layer = tflearn.input_data(shape=[None,num_inputs]
- Pass the input object to create further layers:
layer1 = tflearn.fully_connected(input_layer,10,
activation='relu')
layer2 = tflearn.fully_connected(layer1,10,
activation='relu')
- Add the output layer:
output = tflearn.fully_connected(layer2,n_classes,
activation='softmax')
- Create the final net from the estimator layer such as regression:
net = tflearn.regression(output,
optimizer='adam',
metric=tflearn.metrics.Accuracy(),
loss='categorical_crossentropy'
)
The TFLearn provides several classes for layers that are described in following sub-sections.
推薦閱讀
- Learning SQL Server Reporting Services 2012
- Aftershot Pro:Non-destructive photo editing and management
- 圖解西門(mén)子S7-200系列PLC入門(mén)
- Applied Unsupervised Learning with R
- Linux運(yùn)維之道(第2版)
- Learning Game Physics with Bullet Physics and OpenGL
- VCD、DVD原理與維修
- 分布式微服務(wù)架構(gòu):原理與實(shí)戰(zhàn)
- Visual Media Processing Using Matlab Beginner's Guide
- Arduino BLINK Blueprints
- VMware Workstation:No Experience Necessary
- 單片機(jī)技術(shù)及應(yīng)用
- 筆記本電腦芯片級(jí)維修從入門(mén)到精通(圖解版)
- Arduino項(xiàng)目開(kāi)發(fā):智能生活
- 基于網(wǎng)絡(luò)化教學(xué)的項(xiàng)目化單片機(jī)應(yīng)用技術(shù)