UserWarning: torch.meshgrid

D:\anaconda3\envs\pytorch3\lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\cb\pytorch_1000000000000\work\aten\src\ATen\native\TensorShape.cpp:3484.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]

 解决方法:找到pyrcharm所用的虚拟环境下的functional.py文件

加上   , indexing = 'ij'注意别漏掉逗号!

 原文链接YOLO UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing a_shieres的博客-CSDN博客

你可能感兴趣的:(pytorch,深度学习,python)