深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
Feedback
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-13 1:34 PM Flier LuGreat tips!
请问 eclipse 根目录下面的那个 .eclipseproduct 文件是不是起到类似的作用?我装 together for eclipse 时,老是说找不到此文件。我把他复制到 eclipse 上级目录下,倒是可以装了,但使用不正常 :(
# 图解利用Eclipse3 Lomboz3 Tomcat开发JSP --1.环境 2004-10-13 2:00 PM javamxj
Ping Back来自:blog.youkuaiyun.com
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-13 2:36 PM javamxj
.eclipseproduct 只是一个说明文件,这是它的内容:
name=Eclipse Platform
id=org.eclipse.platform
version=3.0.1
至于together for eclipse ,是典型的利用links方式安装的。
# 图解利用Eclipse3 Lomboz3 Tomcat开发JSP --3.一个JSTL实例 2004-10-15 1:07 AM javamxj
Ping Back来自:blog.youkuaiyun.com
# Lomboz 2004-10-17 10:14 PM jasonye
Ping Back来自:blog.youkuaiyun.com
# 图解利用Eclipse3 Sysdeo Tomcat plugin编辑和调试JSP(1) 2004-10-18 1:55 PM javamxj
Ping Back来自:blog.youkuaiyun.com
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-21 6:14 PM 百分百好牛
eclipse路径
d:/eclipse
myplugins
D:/myplugins
links 目录下
lomboz.301.link
内容为
D://myplugins//lomboz.301
插件的详细目录
D:/myplugins/lomboz.301/eclipse/plugins
可是我打开eclipse 后(301版).
在window->prefences里面,还是看不到lomboz的选项.
到底是哪里不对呢?
谢谢!
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-21 7:22 PM javamxj
To:百分百好牛
把eclipse目录下的configuration目录删除,重启eclispe即可。
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-22 11:09 AM eclipsenewbie
我删除configuration目录后也不行啊
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-22 11:17 AM eclipsenewbie
可以了,但是每个link文件只能有一个插件。是不是link文件有多个插件必须用什么符号分隔啊?
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-22 12:28 PM javamxj
eclipsenewbie:
你需要先安装emf-sdo-xsd-SDK-2.0.1.zip解压后的插件,然后再直接把Lomboz解压在Eclipse/plugins目录下试试。
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-22 12:30 PM javamxj
因为我实验过一个link文件安装多个插件,发现部分插件不能安装,所以我并不推荐这种方法。
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-23 8:41 PM shaird
我也是怎么弄都不能装好LOMBOZ
你们说的方法我都试了啊。是那里出了问题?
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-23 8:45 PM shaird
我把lomboz直接安装和用LINK方法都不行。
但是同样的方法其他插件都能够使用。
# Eclipse基础--使用links方式安装Eclipse插件 2004-10-25 10:49 AM lhaiwen
Ping Back来自:blog.youkuaiyun.com
# Eclipse基础--使用links方式安装Eclipse插件 2004-10-26 7:34 AM Julysea
Ping Back来自:blog.youkuaiyun.com
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-26 11:46 AM sstallman
我把lomboz直接安装和用LINK方法都不行。
但是同样的方法其他插件都能够使用。
需要装一个emf-sdo-xsd-SDK-2.0.1.zip,下载地址http://download.eclipse.org/tools/emf/downloads/drops/2.1.0/I200410220709/emf-sdo-xsd-SDK-I200410220709.zip
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-10-26 9:21 PM shaird
谢谢。
# 学习Eclipse 的配置 2004-10-27 2:28 PM kasam
Ping Back来自:blog.youkuaiyun.com
# 学习 Eclipse基础--使用links方式安装Eclipse插件 2004-10-27 4:43 PM sandyen
Ping Back来自:blog.youkuaiyun.com
# 学习Eclipse 的配置 2004-10-29 11:13 AM fiso
Ping Back来自:blog.youkuaiyun.com
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-11-15 10:32 AM kingwong
8. 如果安装后看不到插件,把eclipse 目录下的configuration目录删除,重启即可。
这句话让我终于在Eclipse下看见了VE1.0.1.1,郁闷几天了,今天终于搞定!
教程就应该这样写!我在网上搜到的要不就是高谈阔论,要不就是very easy解压即可使用之类的话。那是他没有碰到问题!
呵,非常感谢!
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-11-15 11:16 PM wang
8. 如果安装后看不到插件,把eclipse 目录下的configuration目录删除,重启即可。
这句话应该写到Eclipse的FAQ中,真是太 感谢啦!
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-11-21 6:32 PM fww
我都用了大半个月的ECLIPSE简直就是一个字“废”!好象他和很多东西都脱节一样,装个插件也不容易,装上去了还不容易稳定运行。而且我以前JBUILDER的工程,转移到ECLIPSE因为太大,他自己还报什么内部错误,我都要疯掉了,而且如果用CVS或则VSS拉一个工程,简直就是蜗牛一样,一个字慢,什么鬼东西。
在编译的时候,也许我想中途停止,但是停不住。简直就是和JVM是脱节的,你操作你的,他还搞他的。。哎,,头疼啊!!!
我也不知道为什么,难道ECLIPSE插件就是这么不太容易兼容???????
# 回复:Eclipse基础--使用links方式安装Eclipse插件 2004-11-27 9:00 PM tonyad
但是不删除configuration也正常运行了,
不知道configuration的作用和必要性?