【DeepLearning】Exercise:Vectorization

來源:互聯網
上載者:User

標籤:

Exercise:Vectorization

習題的連結:Exercise:Vectorization

 

注意點:

MNIST圖片的像素點已經經過歸一化。

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

將使得訓練得到的可視化權值如:

 

 

我的實現:

更改train.m的參數設定及訓練樣本選取

%% STEP 0: Here we provide the relevant parameters values that will%  allow your sparse autoencoder to get good filters; you do not need to %  change the parameters below.visibleSize = 28*28;   % number of input units hiddenSize = 196;     % 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-3;     % weight decay parameter       beta = 3;            % weight of sparsity penalty term       %%======================================================================%% STEP 1: Implement sampleIMAGES%%  After implementing sampleIMAGES, the display_network command should%  display a random sample of 200 patches from the dataset% MNIST images have already been normalizedimages = loadMNISTImages(‘train-images.idx3-ubyte‘);patches = images(:,1:10000); %display_network(patches(:,randi(size(patches,2),200,1)),8);%  Obtain random parameters thetatheta = initializeParameters(hiddenSize, visibleSize);

 

訓練得到的W1可視化:

【DeepLearning】Exercise:Vectorization

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.