DeepComplexCRN
DeepComplexCRN copied to clipboard
ComplexBatchNorm在训练过程中内存占用不断升高
您好: 我发现把ComplexBatchNorm中的track_running_stats设置为True,在训练过程中的内存占用会不断上升,最终导致内存爆炸。请问您在训练DCCRN时没有出现该问题吗? 谢谢; 祝好!
我也遇到这个问题了 排查了好久才发现的
嗯,建议使用speechBrain里写的复BN。
--------------原始邮件-------------- 发件人:"changingBin @.>; 发送时间:2022年1月16日(星期天) 下午3:05 收件人:"huyanxin/DeepComplexCRN" @.>; 抄送:"刘汝桥 @.>;"Author @.>; 主题:Re: [huyanxin/DeepComplexCRN] ComplexBatchNorm在训练过程中内存占用不断升高 (Issue #20)
我也遇到这个问题了 排查了好久才发现的
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>
https://discuss.pytorch.org/t/how-does-batchnorm-keeps-track-of-running-mean/40084/15 可以参考这个来做修改,应该也是再计算running_mean, runing_var的时候lerp把mean,var也加入计算图里面了
我也遇到了这个问题,请问你解决了吗?
complexnn 文件里 if self.training and self.track_running_stats: self.num_batches_tracked += 1 if self.momentum is None: # use cumulative moving average exponential_average_factor = 1.0 / self.num_batches_tracked.item() else: # use exponential moving average exponential_average_factor = self.momentum .item() 加一个detach就可以