2

I am currently trying to work on RBM in R using deepnet package.I trained an RBM using my own dataset with 3 input points.After training the network I got 2 sets of weights and 2 sets of biases. My code runs like this

a<-matrix(c(1,0,0,0,1,0,0,0,1,1,1,1),nrow=4,ncol=3,byrow=T)
RBM_trn<-rbm.train(a, 2, numepochs = 30, batchsize = 100, learningrate=0.8,
momentum =0.5 ,visible_type = "bin",hidden_type = "bin" , cd = 1)
RBM_trn

The results I obtained were in the sets of 2.I got two 2x3 weight matrix.What does the other matrix mean?

Sandipan Dey
  • 21,482
  • 2
  • 51
  • 63
akanksha
  • 21
  • 2

1 Answers1

1

Check this: https://github.com/cran/deepnet/blob/master/R/rbm_train.R

Where W and B corresponds to learnt weight and bias at every iteration using stochastic (or mini-batch) gradient descent to optimize the cost function, VW and VB combines the momentum as well (helping to minimize noisy weight updates).

Sandipan Dey
  • 21,482
  • 2
  • 51
  • 63
  • 1
    Hi ! Thanks a lot . It has cleared my doubts to a good extent.I know it is quite a naive question but I wanted to know how does VW and VB combine momentum?Can you please give more details??Thanks.. – akanksha Sep 20 '16 at 06:52
  • the updated weights with momentum is returned everytime and again passed as parameter, so that we can start from the best value so far. – Sandipan Dey Sep 20 '16 at 07:09