Prepare dyn_rbm
Add way to get the size of RBM
Reduce duplications
Add common base to rbm/dyn_rbm
Reduce imports