- 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.
推薦閱讀
- ATmega16單片機項目驅動教程
- 辦公通信設備維修
- INSTANT Wijmo Widgets How-to
- Manage Partitions with GParted How-to
- Camtasia Studio 8:Advanced Editing and Publishing Techniques
- 筆記本電腦維修不是事兒(第2版)
- The Deep Learning with Keras Workshop
- 計算機組裝與維護(第3版)
- STM32嵌入式技術應用開發全案例實踐
- 筆記本電腦維修300問
- 超大流量分布式系統架構解決方案:人人都是架構師2.0
- 基于PROTEUS的電路設計、仿真與制板
- 單片機原理及應用:基于C51+Proteus仿真
- Hands-On Motion Graphics with Adobe After Effects CC
- Python Machine Learning Blueprints