adding a test for sparse matrices in RBM