I am implementing Gaussian input based RBM in MATLAB.
vi
has dimension of 100*784, w
has dimension of 784*500, sigma
has dimension of 1*784.
p(h|v)= sigmoid(cj+wij*vi/sigma^2)
. I am getting dimensional error when I multiply w*v/sigma^2
.
I have implemented it as below,
poshidprobspart = bsxfun(@rdivide,data,sigmas.^2);
poshidprobs = 1./(1 + exp(-((vishid * poshidprobspart) + repmat(hidbiases,numcases,1))));
What is causing the error in the code