Update rbm.py

Added example
Fixed weight update