title: Gaussian visible units in rbm
body: <p>I want to implement Gaussian RBM.For that i want to make zero mean and unit variance of data.my data is MNIST dataset.The dataset has been taken and followed from the following link.</p>
  
  <p>Visit <a href="http://www.cs.toronto.edu/~hinton/code/makebatches.m" rel="nofollow">http://www.cs.toronto.edu/~hinton/code/makebatches.m</a></p>
  
  <p>so i implemented in below way.But my data become NAN.It becomes NAN after dividing the data with standard deviation.</p>
  
  <pre><code>for epoch = epoch:maxepoch,
  fprintf(1,'epoch %d \r',epoch); 
  errsum=0;
  for batch = 1:numbatches,
  fprintf(1,'epoch %d batch %d \r',epoch,batch); 
  </code></pre>
  
  <p>%START POSITIVE PHASE</p>
  
  <pre><code>data = batchdata(:,:,batch);
  </code></pre>
  
  <p>% zero mean and unit variance</p>
  
  <pre><code>data_mean = mean(data,1);
  data=bsxfun(@minus,data,data_mean);
  data_std = std(data1,[],1);
  data=bsxfun(@rdivide,data,data_std);
  </code></pre>
  
  <p>I tried this with small set of examples.It works well.What will be the reason to become NAN.</p>
  
  <p>How to get rid of this and make Gaussian input with zero mean and unit variance.</p>