stylegan2-pytorch
stylegan2-pytorch copied to clipboard
Bug: gradient_accumulate_contexts function
With ref to : https://github.com/lucidrains/stylegan2-pytorch/blob/0588213d4e552095905873a24f577007c40c1667/stylegan2_pytorch/stylegan2_pytorch.py#L215-L226
I think "map(lambda ddp: ddp.no_sync, ddps)
" should be changed to "list(map(lambda ddp: ddp.no_sync, ddps))
"
Otherwise, since map is an iterator, it can be used only once, and then the function of gradient_accumulate cannot work well.
it is iterated over within the combine contexts function