deeplearning.net教程使用

在衆多關於Deep Learning的教程中,deeplearning.net算是其中一個不錯的學習網站。deeplearning.net的教程採用Python代碼作爲實例。讀代碼和運行代碼是深入瞭解一個算法的必經之路。以下是關於Ubuntu下使用deeplearning.net的經驗。

1. 配置Pydev+Eclipse

2.下載教程

git clone git://github.com/lisa-lab/DeepLearningTutorials.git

下載後可以看到data文件夾下有個download.sh腳本文件,執行腳本文件下載實驗數據

3.安裝Theano

sudo apt-get install python-pip
sudo pip install Theano

4.測試例子Classifying MNIST digits using Logistic Regression

利用實例的code新建Python project,修改sgd_optimization_mnist函數中形參dataset爲數據集mnist.pkl.gz的實際位置並run代碼,得到類似如下結果:

... loading data
... building the model
... training the model
epoch 1, minibatch 83/83, validation error 12.458333 %
     epoch 1, minibatch 83/83, test error of best model 12.375000 %
epoch 2, minibatch 83/83, validation error 11.010417 %
     epoch 2, minibatch 83/83, test error of best model 10.958333 %
epoch 3, minibatch 83/83, validation error 10.312500 %
     epoch 3, minibatch 83/83, test error of best model 10.312500 %
epoch 4, minibatch 83/83, validation error 9.875000 %
...
epoch 73, minibatch 83/83, validation error 7.500000 %
     epoch 73, minibatch 83/83, test error of best model 7.489583 %
Optimization complete with best validation score of 7.500000 %,with test performance 7.489583 %
The code run for 74 epochs, with 5.149994 epochs/sec
The code for file main.py ran for 14.4s


PS:

第1和第2步並非是必經步驟,只是本人的習慣而已。

deeplearning.net教程的網址:

http://www.deeplearning.net/tutorial/contents.html


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章