Exercise:Vectorization

习题的链接:Exercise:Vectorization

注意点:

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

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

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

更改train.m的参数设置

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

更改sampleIMAGES.m

  1. function patches = sampleIMAGES()
  2. % sampleIMAGES
  3. % Returns patches for training
  4.  
  5. load images; % load images from disk
  6.  
  7. patchsize = ; % we'll use 28x28 patches
  8. numpatches = ;
  9.  
  10. % Initialize patches with zeros. Your code will fill in this matrix--one
  11. % column per patch, columns.
  12. patches = zeros(patchsize*patchsize, numpatches);
  13.  
  14. %% ---------- YOUR CODE HERE --------------------------------------
  15. % Instructions: Fill in the variable called "patches" using data
  16. % from images.
  17.  
  18. 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. Android -- java代码设置margin

    我们平常可以直接在xml里设置margin,如: <ImageView android:layout_margin="5dip" android:src="@dra ...

  2. Building LinkedIn’s Real-time Activity Data Pipeline

    转自:http://blog.163.com/guaiguai_family/blog/static/20078414520138911393767/ http://sites.computer.or ...

  3. Eclipse里选一个变量后,这个类里的该变量不变色了

    使用“Alt+Shift+O”对该提示功能的开/关切换

  4. win8下Source Insight has not been installed completely问题的解决

    系统:windows8 软件:Source Insight 3.5 安装后打开总是提示如下图错误,没法使用. 卸载重新安装好多次,还是不行,百度一下,终于找到方法,记录一下,方便以后查找. 解决方法: ...

  5. xshell5不能用

    转载:xshell 5 不能用 https://51.ruyo.net/10002.html

  6. how-to-get-a-job-in-deep-learning

    http://blog.deepgram.com/how-to-get-a-job-in-deep-learning/ How to Get a Job In Deep Learning 22 SEP ...

  7. Logcat用法初探

    首先定位到adb所在的目录 将手机连接上电脑. 在命令行运行: adb devices 这个命令可以列出所有连上的移动设备. 在命令行运行: adb logcat 可以显示日志.   以下是例子截图: ...

  8. HotSpot Java虚拟机中的“方法区”“持久代”“元数据区”的关系?

    Sun/Oracle JDK的HotSpot VM中,直到JDK7都有“持久代”(Permanent Generation,简称PermGen).也称为方法区.Oracle JDK8的HotSpot ...

  9. LXC 容器集chroot使用说明

    1.1 LXC是什么? 1.1.1 关于LXC LXC,其名称来自Linux软件容器(Linux Containers)的缩写,一种操作系统层虚拟化(Operating system–level vi ...

  10. javascript高级语法学习

    可维护的代码意味着: 可读的 一致的 可预测的 看上去就像是同一个人写的 已记录 命名函数表达式 (function fn(){}) 他是表达式的原因是因为括号 ()是一个分组操作符,它的内部只能包含 ...