Files
matlab/RBM/norbload.asv
T
jens 7b34529b24 imported RBM
git-svn-id: http://moon:8086/svn/matlab/trunk@91 801c6759-fa7c-4059-a304-17956f83a07c
2016-07-12 11:24:12 +00:00

20 lines
689 B
Plaintext

function norbload()
fid=fopen('smallnorb-5x46789x9x18x6x2x96x96-training-dat.mat','r');
fread(fid,4,'uchar'); % result = [85 76 61 30], byte matrix(in base 16: [55 4C 3D 1E])
fread(fid,4,'uchar'); % result = [4 0 0 0], ndim = 4
numImages = fread(fid,4,'uchar'); % result = [236 94 0 0], dim0 = 24300 (=94*256+236)
fread(fid,4,'uchar'); % result = [2 0 0 0], dim1 = 2
fread(fid,4,'uchar'); % result = [96 0 0 0], dim2 = 96
fread(fid,4,'uchar'); % result = [96 0 0 0], dim3 = 96
numImages = numImages
for n=1:200,
im = transpose(reshape(fread(fid,96*96),96,96))/256;
if (mod(n, 2) == 0)
size(im)
imshow(im); % show the first image
pause (0.1);
end
end;