하면서 이런이런것을 공부했다[연구노트]/Python, Ubuntu

'torch' has no member <method> error in VSCode, windows10 해결하기

junha1125 2020. 3. 24. 22:22

이와 같은 간단한 코드에서, torch에 빨간 줄이 처지며 torch has no member ones 라는 에러가 뜨곤 했다. 

(.py파일에만 이와 같은 문제가 발생한다. ipynb파일에는 발생하지 않는다.)

 

이 문제를 해결하기 위해 이 사이트를 참조해 해결했다.

[http://www.programmersought.com/article/9184357862/]

 

원래 나의 설정 모습

 

변경 후 설정 모습 

이 path는 terminal (windows powershell) 을 이용했다.