NVlabs / stylegan3

Official PyTorch implementation of StyleGAN3
Other
6.38k stars 1.12k forks source link

align_corners option in grid_sampler_2d_backward() #220

Open MarianneSheridan opened 1 year ago

MarianneSheridan commented 1 year ago

Hi!

I was trying the grdi_sample() function from https://github.com/NVlabs/stylegan3/blob/407db86e6fe432540a22515310188288687858fa/torch_utils/ops/grid_sample_gradfix.py#L28

And the default setting is mode='bilinear', padding_mode='zeros', align_corners=False. I set the align_corners=True in all the settings in the file. But the backpropogatiion results from this grid_sample and F.grid_sample are different. Anyone have the idea why?