onejiin / CycleGAN-VC2

CycleGAN-VC2: Improved CycleGAN-based Non-parallel Voice Conversion
MIT License
41 stars 7 forks source link

Memory leaking bug #4

Closed jxzhanggg closed 4 years ago

jxzhanggg commented 4 years ago

Hi, Thanks for your work. I found the train process got slower and slower during running. After inspection, I suspect there's memory leaking problem in your code. In "train.py", model.summary() is called, which will add the computing graph new node each training step. This will make the computational graph larger and larger and leading to slower training. Actually, this function is already called and added to the graph at the model.py init() the last line "... = self.summary()". If you check the leimao's original code, you'll find it doesn't have this line. Removing this model.summary() at train.py will fix the memory leaking bug.

onejiin commented 4 years ago

Thanks for your comment I fixed and commit Best,