Exercise:Vectorization

习题的链接:Exercise:Vectorization

注意点:

MNIST图片的像素点已经经过归一化。

如果再使用Exercise:Sparse Autoencoder中的sampleIMAGES.m进行归一化,

将使得训练得到的可视化权值如下图:

更改train.m的参数设置

visibleSize = *;   % number of input units
hiddenSize = ; % number of hidden units
sparsityParam = 0.1; % desired average activation of the hidden units.
% (This was denoted by the Greek alphabet rho, which looks like a lower-case "p",
% in the lecture notes).
lambda = 3e-; % weight decay parameter
beta = ; % weight of sparsity penalty term

更改sampleIMAGES.m

function patches = sampleIMAGES()
% sampleIMAGES
% Returns patches for training load images; % load images from disk patchsize = ; % we'll use 28x28 patches
numpatches = ; % Initialize patches with zeros. Your code will fill in this matrix--one
% column per patch, columns.
patches = zeros(patchsize*patchsize, numpatches); %% ---------- YOUR CODE HERE --------------------------------------
% Instructions: Fill in the variable called "patches" using data
% from images. patches = images(:, :);

训练得到的W1可视化:

【DeepLearning】Exercise:Vectorization的更多相关文章

  1. 【DeepLearning】Exercise:Softmax Regression

    Exercise:Softmax Regression 习题的链接:Exercise:Softmax Regression softmaxCost.m function [cost, grad] = ...

  2. 【DeepLearning】Exercise:Convolution and Pooling

    Exercise:Convolution and Pooling 习题链接:Exercise:Convolution and Pooling cnnExercise.m %% CS294A/CS294 ...

  3. 【DeepLearning】Exercise:Learning color features with Sparse Autoencoders

    Exercise:Learning color features with Sparse Autoencoders 习题链接:Exercise:Learning color features with ...

  4. 【DeepLearning】Exercise: Implement deep networks for digit classification

    Exercise: Implement deep networks for digit classification 习题链接:Exercise: Implement deep networks fo ...

  5. 【DeepLearning】Exercise:Self-Taught Learning

    Exercise:Self-Taught Learning 习题链接:Exercise:Self-Taught Learning feedForwardAutoencoder.m function [ ...

  6. 【DeepLearning】Exercise:PCA and Whitening

    Exercise:PCA and Whitening 习题链接:Exercise:PCA and Whitening pca_gen.m %%============================= ...

  7. 【DeepLearning】Exercise:PCA in 2D

    Exercise:PCA in 2D 习题的链接:Exercise:PCA in 2D pca_2d.m close all %%=================================== ...

  8. 【DeepLearning】Exercise:Sparse Autoencoder

    Exercise:Sparse Autoencoder 习题的链接:Exercise:Sparse Autoencoder 注意点: 1.训练样本像素值需要归一化. 因为输出层的激活函数是logist ...

  9. 【UFLDL】Exercise: Convolutional Neural Network

    这个exercise需要完成cnn中的forward pass,cost,error和gradient的计算.需要弄清楚每一层的以上四个步骤的原理,并且要充分利用matlab的矩阵运算.大概把过程总结 ...

随机推荐

  1. nginx配置目录列表访问权限

    我们知道apache httpd默认情况下会显示访问目录的文件列表,但是nginx访问时如果目录下面没有默认首页,那么会返回403 Forbidden的错误,表示没有权限访问,比如根目录就是nginx ...

  2. Android -- queryIntentActivities

    某些时候你想要知道某个APP是否有注册了一个明确的intent,比如说你想要检查某个receiver是否存在,然后根据是否存在来这个receiver来在你的AP里面enable某些功能.我们可以通过P ...

  3. linux运维需要掌握的基础知识

    踏入linux运维工程师这一职业,其实有很多工具技能需要掌握,下面我来给大家一一介绍. 1.shell脚本和另一个脚本语言,shell是运维人员必须具备的,不懂这个连入职都不行,至少也要写出一些系统管 ...

  4. Hadoop:安装ftp over hdfs

    https://blog.csdn.net/sptoor/article/details/11484855 https://blog.csdn.net/tengxing007/article/deta ...

  5. javascript计算字符串长度

    javascript计算字符串长度 学习了:https://blog.csdn.net/u012934325/article/details/75214847 function getByteLen( ...

  6. ubuntu16.04下部署tomcat9和java8启动一次需要七八分钟

    一.环境如下 Ubuntu16.04  +tomcat9+openjdk1.8 二.问题 在tomcat的bin下执行./startup.sh 如下图没有问题 root@bogon:/usr/apac ...

  7. Sublime 3156 LICENSE key

    mac sublime3 3156 LICENSE 转自:http://blog.csdn.net/myboyliu2007/article/details/78748253 下载地址:https:/ ...

  8. JavaScript筛选出数组种连续的数字

    function arrange(source) { var t; var ta; var r = []; for(var j=0;j<source.length;j++){ var v=sou ...

  9. .NET Framework System.Array.Sort 数组类,加深对 IComparer、IComparable 以及泛型委托、匿名方法、Lambda 表达式的理解

    本文内容 自定义类 Array.Sort 参考资料 System.Array.Sort 有很多对集合的操作,比如排序,查找,克隆等等,你可以利用这个类加深对 IComparer.IComparable ...

  10. SuperMap入门3——Hello World

    Hello World程序很重要,对于入门来说,它可以检测我们的环境.配置是否正确,感受程序的易用性等. 添加工具 由于我是使用的VS2017+ SuperMap iObject绿色免安装版,所以新建 ...