Skip to content

Blog

[已解決] RuntimeError: Input and parameter tensors are not at the same device, found input tensor at cpu and parameter tensor at cuda:0

今天,我在使用 PyTorch 讀取一個已經訓練好的模型進行全新資料的分類時,意外地遇到了以下這個報錯:

RuntimeError: Input and parameter tensors are not at the same device, found input tensor at cuda:1 and parameter tensor at cuda:0
Read More »[已解決] RuntimeError: Input and parameter tensors are not at the same device, found input tensor at cpu and parameter tensor at cuda:0