Open LinfengYuan1997 opened 3 years ago
Hi, we train the model using pytorch 1.5.0. We did not test the code on higher versions.
Hi, we train the model using pytorch 1.5.0. We did not test the code on higher versions.
So you also met the warning about the "Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details. "Default grid_sample and affine_grid behavior has changed "", and a warning about 'mean' & 'reduction' of cross_entropy_2d(), right?
Thanks for sharing your fantastic work!
I am using your code with PyTorch version >= 1.6.0. And it seems that the operation of F.affine_grid() & F.grid_sample() has been changed leading to the warning :
UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details. "Default grid_sample and affine_grid behavior has changed "
Because I don't know the running Pytorch version of your environment, I am not sure whether I need to change the align_corners argument.
The same issues occur for upsample function
UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and now uses scale_factor directly, instead of relying on the computed output size. If you wish to restore the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details. "The default behavior for interpolate/upsample with float scale_factor changed "
Could you please tell me the running version of your PyTorch?