I've set config.input_threads to 1 and removed self.potentials[i].share_memory_() from my code. otherwise it will report memory issue. But self.potentials will be changed for no reason, I don't know why . it would work when share_memory_ is added. why?
for i, _ in enumerate(self.pot_trees):
self.potentials[i].share_memory_()