问题描述
深度学习训练常见问题:
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
/home/ls/anaconda3/envs/bytetrack/lib/python3.8/site-packages/torch/functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2228.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
解决方案:
找到文件位置:/home/ls/anaconda3/envs/bytetrack/lib/python3.8/site-packages/torch/functional.py:568:
# return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
#添加 **indexing = 'ij'**
return _VF.meshgrid(tensors, **kwargs,indexing = 'ij') # type: ignore[attr-defined]