added bernoulli-bernoulli rbm; refactored mlp code