[rbm] add function declaration for average free energy of a rbm, this function should be suited better for energy calculation