본문 바로가기

Data-science/deep learning

pytorch 에러 DistributedDataParallel 에러

반응형

 

if self.reducer._rebuild_buckets():
RuntimeError: Expected to have finished  reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by (1) passing the keyword argumentere not used in producing loss. You can enable unused parameter detection by (1) passing the keyword argument `find_unused_parameters=True`torch.nn.parallel.DistributedDataParallel`; (2) making sure all `forward` function outputs participate in calculating loss.

 

이런 에러인데, DistributedDataParallel 호출시 keyword 인자로 find_unused_parameters=True로 주면된다.

반응형