使用Anaconda安装完pytorch后
在VSCode中输入代码时发现,对于很多需要用到的torch里的函数,VSCode均会报错。
‘torch’ has no member ‘xxx’
经过搜索资料,找到了解决办法。
在VSCode setting中搜索python.linting.pylintPath
并且修改值为(你的Anaconda安装路径)\pkgs\pylint-1.8.4-py36_0\Scripts\pylint,修改完后就不会再报错了。
使用Anaconda安装完pytorch后
在VSCode中输入代码时发现,对于很多需要用到的torch里的函数,VSCode均会报错。
‘torch’ has no member ‘xxx’
经过搜索资料,找到了解决办法。
在VSCode setting中搜索python.linting.pylintPath
并且修改值为(你的Anaconda安装路径)\pkgs\pylint-1.8.4-py36_0\Scripts\pylint,修改完后就不会再报错了。