Update rbm.py

added rng functions