CPU tensor转GPU tensor:. cpu_imgs.cuda() 2. GPU tensor 转CPU tensor:. gpu_imgs.cpu() 3. numpy转为CPU tensor:. torch.from_numpy( imgs )
確定! 回上一頁