標籤:
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