rbm constructor