Changed the pickling code so that the array values for W,bvis,bhid are used to instantiate shared variables.