资源简介
深度学习源代码,hinton论文附带源代码,包括图像编码和解码两部分。通过训练深层网络降维高位图片数据,并比较复原误差。主要利用级联Boltzmann估计多层网络初始参数,使得多层神经网络可以被很好的训练并得到理想结果。
代码片段和文件信息
% Version 1.000
%
% Code provided by Ruslan Salakhutdinov and Geoff Hinton
%
% Permission is granted for anyone to copy use modify or distribute this
% program and accompanying programs and documents for any purpose provided
% this copyright notice is retained and prominently displayed along with
% a note saying that the original programs are available from our
% web page.
% The programs and documents are distributed without any warranty express or
% implied. As the programs were written for research purposes only they have
% not been tested to the degree that would be advisable in any important
% application. All use of these programs is entirely at the user‘s own risk.
% This program fine-tunes an autoencoder with backpropagation.
% Weights of the autoencoder are going to be saved in mnist_weights.mat
% and trainig and test reconstruction errors in mnist_error.mat
% You can also set maxepoch default value is 200 as in our paper.
maxepoch=200;
fprintf(1‘\nFine-tuning deep autoencoder by minimizing cross entropy error. \n‘);
fprintf(1‘60 batches of 1000 cases each. \n‘);
load mnistvh
load mnisthp
load mnisthp2
load mnistpo
makebatches;
[numcases numdims numbatches]=size(batchdata);
N=numcases;
%%%% PREINITIALIZE WEIGHTS OF THE AUTOENCODER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
w1=[vishid; hidrecbiases];
w2=[hidpen; penrecbiases];
w3=[hidpen2; penrecbiases2];
w4=[hidtop; toprecbiases];
w5=[hidtop‘; topgenbiases];
w6=[hidpen2‘; hidgenbiases2];
w7=[hidpen‘; hidgenbiases];
w8=[vishid‘; visbiases];
%%%%%%%%%% END OF PREINITIALIZATIO OF WEIGHTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
l1=size(w11)-1;
l2=size(w21)-1;
l3=size(w31)-1;
l4=size(w41)-1;
l5=size(w51)-1;
l6=size(w61)-1;
l7=size(w71)-1;
l8=size(w81)-1;
l9=l1;
test_err=[];
train_err=[];
for epoch = 1:maxepoch
%%%%%%%%%%%%%%%%%%%% COMPUTE TRAINING RECONSTRUCTION ERROR %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
err=0;
[numcases numdims numbatches]=size(batchdata);
N=numcases;
for batch = 1:numbatches
data = [batchdata(::batch)];
data = [data ones(N1)];
w1probs = 1./(1 + exp(-data*w1)); w1probs = [w1probs ones(N1)];
w2probs = 1./(1 + exp(-w1probs*w2)); w2probs = [w2probs ones(N1)];
w3probs = 1./(1 + exp(-w2probs*w3)); w3probs = [w3probs ones(N1)];
w4probs = w3probs*w4; w4probs = [w4probs ones(N1)];
w5probs = 1./(1 + exp(-w4probs*w5)); w5probs = [w5probs ones(N1)];
w6probs = 1./(1 + exp(-w5probs*w6)); w6probs = [w6probs ones(N1)];
w7probs = 1./(1 + exp(-w6probs*w7)); w7probs = [w7probs ones(N1)];
dataout = 1./(1 + exp(-w7probs*w8));
err= err + 1/N*sum(sum( (data(:1:end-1)-dataout).^2 ));
end
train_err(epoch)=err/numbatches;
%%%%%%%%%%%%%% END OF COMPUTING TRAINING RECONSTRUCTION ERROR %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% DISPLAY FIGURE TOP ROW REAL DATA BOTTOM ROW RECONSTRUCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%
fprintf(1‘Displaying in figure 1: Top row - real data Bottom row -- reconstructions \n‘);
output=[];
for i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5594 2006-05-24 04:09 code\backprop.m
文件 2723 2006-05-24 04:09 code\CG_MNIST.m
文件 3010 2006-05-24 04:09 code\converter.m
文件 2523 2006-05-24 04:09 code\makebatches.m
文件 9003 2006-05-24 04:09 code\minimize.m
文件 2199 2006-05-24 04:09 code\mnistdeepauto.m
文件 1084 2006-05-24 04:09 code\mnistdisp.m
文件 3914 2006-05-24 04:09 code\rbm.m
文件 3964 2006-05-24 04:09 code\rbmhidlinear.m
文件 2245 2006-05-24 04:35 code\README.txt
文件 1648877 2014-10-24 16:58 code\t10k-images-idx3-ubyte.gz
文件 4542 2014-10-24 16:57 code\t10k-labels-idx1-ubyte.gz
文件 9912422 2014-10-24 17:03 code\train-images-idx3-ubyte.gz
文件 28881 2014-10-24 16:57 code\train-labels-idx1-ubyte.gz
目录 0 2014-10-24 17:03 code
----------- --------- ---------- ----- ----
11630981 15
相关资源
- 概率统计超入门
- 黄海广博士整理的吴恩达深度学习笔
- Neural Networks and Deep Learning-神经网络与
- 深度学习资料+官方文档
- 动手学深度学习源代码
- 深度学习框架PyTorch:入门与实践 PD
- Reinforcement Learning an Introduction,2018正
- 深度学习卷积神经网络代码
- 深度学习/图像识别/TensorFlow
- fashion-mnist数据集
- 深度学习 [deep learning] AI圣经 Deep Lea
- 一天弄懂深度学习-李宏毅PPT+PDF超级高
- 解压后的MNIST数据集
- 深度学习车牌识别模型.zip
- 深度学习 智能时代的核心驱动力量
- imdb.npz数据集
- tensorflow实战+实战Google深度学习框架
- 基于深度学习的目标检测程序
- 吴恩达老师深度学习第一课神经网络
- 深度学习 AI圣经 中文高清版 带完整目
- Coursera课程Deeplearning深度学习笔记+课
- 深度学习打标软件.rar
- 用于视频的目标检测
- 深度学习-21天实战caffe高清.pdf版
- 基于深度学习的计算机视觉.pdf
- 语音识别 论文合集
- caffe验证码识别数据集及模型
- 深度学习(花书)代码和笔记
- 一天搞懂深度学习.
- Tensorflow 实战Google深度学习框架 源码
评论
共有 条评论