解决fasterrcnn训练警告UserWarning

解决警告UserWarning: torch.meshgrid: in an upcoming release, it will be required to
。。。。
解决方法:
将return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
修改为return _VF.meshgrid(tensors, **kwargs, indexing = ‘ij’) # type: ignore[attr-defined],警告解除
————————————————
 

应该是torch版本不匹配,亲测有效,不再出现UserWarning

你可能感兴趣的:(pycharm,pytorch)