My answer might not be the direct solution, but can be somehow relevant. I met the same warning but it was caused by calling torch.cartesian_prod(*tensors)
.
/opt/conda/lib/python3.7/site-packages/torch/functional.py:1069: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1634272168290/work/aten/src/ATen/native/TensorShape.cpp:2157.)return _VF.cartesian_prod(tensors) # type: ignore[attr-defined]
From my personal experience, I could not find any relatives between _VF.cartesian_prod
and meshgrid
, but the warning is there. Some other guys have encountered this, and see pytorch issue #50276. The engineer from Pytorch promised to take a look at it, but I guess they may ignore (or perhaps forget) this.
So I believe this may not be a serious problem and hinder the usage of Pytorch. Just go ahead with it and see whether in the future release, any new arguments (e.g., index) are needed.