photosynthesis-team / piq

Measures and metrics for image2image tasks. PyTorch.
Apache License 2.0
1.4k stars 120 forks source link

Add indexing to pytorch meshgrid #358

Closed rbischof closed 1 year ago

rbischof commented 1 year ago

I am receiving warnings from pytorch when using the vsi metric: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument.

There is a note in the pytorch documentation for meshgrid: torch.meshgrid(tensors) currently has the same behavior as calling numpy.meshgrid(arrays, indexing=’ij’). In the future torch.meshgrid will transition to indexing=’xy’ as the default.

It is necessary to add indexing=’ij’ in the call to meshgrid here to keep the same functionality.