initial code for binary restricted boltzman machine