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. Java奇淫巧技之Lombok

    http://blog.csdn.net/ghsau/article/details/52334762

  2. Spring(十三):使用工厂方法来配置Bean的两种方式(静态工厂方法&实例工厂方法)

    通过调用静态工厂方法创建Bean 1)调用静态工厂方法创建Bean是将对象创建的过程封装到静态方法中.当客户端需要对象时,只需要简单地调用静态方法,而不需要关心创建对象的具体细节. 2)要声明通过静态 ...

  3. Mac下brew/memcached/nginx/iterm/zsh的安装

    brew  https://www.cnblogs.com/fireworld/p/8609190.html memcached https://blog.csdn.net/whereismatrix ...

  4. (转)Unity3D研究院之手游开发中所有特殊的文件夹(assetbundle与Application.persistentDataPath)

    这里列举出手游开发中用到了所有特殊文件夹. 1.Editor Editor文件夹可以在根目录下,也可以在子目录里,只要名子叫Editor就可以.比如目录:/xxx/xxx/Editor  和 /Edi ...

  5. IntelliJ idea配置python

    为什么选择Intellij?因为我需要系统地管理python工程,Intellij可断点调试. 1.下载IntelliJ idea 在百度中搜索“IntelliJ idea”,并点击官网地址进行下载: ...

  6. linux安装experss搭建本地服务器

    准备nodejs和npm 保证本地安装了nodeJS和npm,如果没有安装的话,通过下面的命令进行安装: sudo apt-get install nodejs //安装nodeJS sudo apt ...

  7. linux:C++的socket编程

    基本的局域网聊天 局域网聊天TCP服务端: #include <sys/types.h> #include <sys/socket.h> #include <stdio. ...

  8. Android MarsDaemon实现进程及Service常驻

    前段时间.就讨论过关于怎样让Service常驻于内存而不被杀死,最后的结论就是使用JNI实现守护进程,可是不得不说的是,在没有改动系统源代码的情况下,想真正实现杀不死服务,是一件非常难的事情.眼下除了 ...

  9. ANT task之Junit、JunitReport

    一.ANT任务之Junit: 学习ANT其实主要是学习ANT的task,ANT众多task中有一个Testing Tasks,它下面有两个任务:Junit和JunitReport,主要用来进行单元测试 ...

  10. 在linux下makefile的使用

    在linux下makefile的使用