0

I am programming on MATLAB and want to use RBMs with real-valued input, like greyscale images, so I tried to follow what Hinton said in this article.

The images have integer values in [0, 255] and are stored in a matrix D which is [numImages x numPixel]. So I started preprocessing the data:

  • scaled the entire dataset so that all the values are in [0, 1] with

    D = D / 255;
    
  • brought every pixel to have zero mean across all images, so I subtracted from every column of the matrix its mean value with

    imgMean = mean(D);    % row vector
    D = D - repmat(imgMean, rows, 1);
    
  • divided the entire dataset by its standard deviation, so that every pixel has unit variance, with

    D = D / std(D(:));
    

But when I try to plot the images, the result is clearly very dark, since many values become negative and are clipped to zero.

Is this ok or did I make any mistake with the preprocessing?

minomic
  • 645
  • 1
  • 9
  • 22

0 Answers0