added RBM utility, fixed matrix-pointwise operation