stylegan2-pytorch icon indicating copy to clipboard operation
stylegan2-pytorch copied to clipboard

Bug: gradient_accumulate_contexts function

Open spnova12 opened this issue 1 year ago • 1 comments

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.

spnova12 avatar Aug 04 '22 14:08 spnova12

it is iterated over within the combine contexts function

lucidrains avatar Aug 08 '22 23:08 lucidrains