YOLO UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing a

在运行yolo时出现了一个警告return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]

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

 具体可以根据报错的提示找到functional的504行

加上如下代码 indexing = 'ij'

 保存,问题解决!

 

物联沃分享整理
物联沃-IOTWORD物联网 » YOLO UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing a

发表评论