解决 PyTorch 中 torch.meshgrid 的警告问题

解决 PyTorch 中 torch.meshgrid 的警告问题

解决 PyTorch 中 torch.meshgrid 的警告问题

问题描述

在使用 PyTorch 2.9.1+cu130 版本时,可能会遇到以下警告:

C:\Users\hp\.conda\envs\pytorch\Lib\site-packages\torch\functional.py:505: UserWarning: torch.meshgrid:inan upcoming release, it will be required to pass the indexing argument.(<