Skip to content

6 5 月, 2020

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

Last Updated on 2021-06-28 by Clay

今天,我在使用 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