iT邦幫忙

0

python 深度學習 錯誤訊息

BB 2021-10-28 20:15:491186 瀏覽
  • 分享至 

  • xImage

當我開始調用gpu做深度學習的時候
只要進行model.fit後便會出現
以至於我要將整個vscode關閉後重新開啟

Error: Session cannot generate requests
at w.executeCodeCell (c:\Users\lucie\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:301310)
at w.execute (c:\Users\lucie\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:300703)
at w.start (c:\Users\lucie\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:296367)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async t.CellExecutionQueue.executeQueuedCells (c:\Users\lucie\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:311160)
at async t.CellExecutionQueue.start (c:\Users\lucie\.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:310700)

如果關閉調用gpu

import os

os.environ["CUDA_VISIBLE_DEVICES"] = "-1"

就可以正常使用

請問該如何解決這個問題?

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
增廣建文
iT邦研究生 5 級 ‧ 2021-11-13 03:22:51
最佳解答

看起來是vscode在跟ipython kernel溝同時發生錯誤
基本上只要restart kernel就好, 不必把整個視窗關掉

https://answers.ros.org/question/77706/catkin_make-problem-with-xacro-when-installing-gazebo/

目前的暫時解法只有把jupyter降版

https://github.com/microsoft/vscode-jupyter/issues/7167#issuecomment-916686306

我要發表回答

立即登入回答