added rbm top k computation