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. printf()详解之终极无惑

    1.printf()简介 printf()是C语言标准库函数,用于将格式化后的字符串输出到标准输出.标准输出,即标准输出文件,对应终端的屏幕.printf()申明于头文件stdio.h. 函数原型: ...

  2. 【Scala】Scala学习资料

    Scala学习资料 java 树形 分类器_百度搜索 决策树分类器-Java实现 - CSDN博客 KNN分类器-Java实现 - CSDN博客 学习:java设计模式—分类 - 飞翔荷兰人 - 博客 ...

  3. Wifidog初分析

    一.综述 wifidog是搭建无线热点认证系统的解决方案之一,他比nocat.nodog更适合互联网营销思路.常见的使用在openwrt系统上,它实现了路由器和认证服务器的数据交互,在路由器方(客户端 ...

  4. Mat类具体解释(二)

    Mat::~Mat Mat的析构函数. C++: Mat::~Mat() 析构函数调用Mat::release(). Mat::operator = 提供矩阵赋值操作. C++: Mat& M ...

  5. Android 演示 ViewPager

    本文内容 环境 项目结构 演示 1:PagerTitleStrip 演示 2:PagerTabStrip 演示 3:ViewPager 和动态 Fragment 下载 Demo 环境 Windows ...

  6. js 时间加减

    //js格式化时间 "yyyy-MM-dd hh:mm:ss" Date.prototype.Format = function (fmt) { var o = { "M ...

  7. 牛客网-《剑指offer》-变态跳台阶

    C++ class Solution { public: int jumpFloorII(int n) { <<--n; } }; 推导: 关于本题,前提是n个台阶会有一次n阶的跳法.分析 ...

  8. 从MyEclipse到IntelliJ IDEA ——让你脱键盘,全键盘操作

    从MyEclipse到IntelliJ IDEA ——让你脱键盘,全键盘操作 从MyEclipse转战到IntelliJ IDEA的经历 我一个朋友写了一篇“从Eclipse到Android Stud ...

  9. 005-Go 操作PostgreSQL数据库

    package main import( "fmt" "database/sql" _ "github.com/lib/pq" " ...

  10. server.xml引入子文件配置(tomcat虚拟主机)[转]

    在配置tomcat虚拟主机时候,如何每一个虚拟主机写成单独文件,server.xml包含这些子文件? 如以下<OneinStack>中,添加JAVA环境虚拟主机后tomcat配置文件详情: ...