Hi, I presume the same steps are to make the normal RBM take in real/gaussian numbers ?
On Monday, 11 March 2013 21:32:19 UTC, Nicolas Boulanger-Lewandowski wrote: > > Hi, > > The shared_normal and shared_zeros are simply convenience functions to > initialize weight and bias *parameters* respectively; they both return > float shared variables. > > For sequences of real-valued visible units, you can use the Gaussian RBM. > To adapt the code for Gaussian RBM, you need to alter two things: > > - Add 0.5*(v**2).sum() to the free energy > - Modify the sampling for v_i from Bernoulli to normal with variance 1 : > mean_v = T.dot(h, W.T) + vbias > v = mean_v + rng.normal(size=mean_v.shape, avg=0.0, std=1.0, > dtype=theano.config.floatX) > > You can also replace the monitoring cost to the L2 error: (v-mean_v)**2 > > > On Sunday, March 10, 2013 8:51:19 AM UTC-4, Alexander Bridi wrote: >> >> Hey all, >> >> I'm trying to modify the rnnrbm.py tutorial code to allow for non-binary >> inputs/outputs. >> >> So far, I found the modification must be made between the output of the >> RNN and the input of the RBM, possibly around the binary bh, bv, bu >> variables. >> >> I tried creating these variables via the shared_normal function (as >> opposed to the shared_zeros function), but I end up running into >> a ValueError around the IncSubtensor's dtype consistency. >> >> But more importantly, is this the right thing to do!? I have the feeling >> this isn't, because the shared_normal function just initializes the >> variable in a non-binary manor and doesn't play a role in the updates.. but >> I'm not sure how to modify the recurrence function to yield non-binary >> outputs/ >> >> Has anyone tried doing this already? >> >> Any advice would be much appreciated! >> >> Thanks, >> >> Alexander >> > -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
