CSA-inpainting icon indicating copy to clipboard operation
CSA-inpainting copied to clipboard

您的工作很出色,想请教您关于复现您的代码时GPU应该如何指定的问题

Open zhangweiweicpp opened this issue 4 years ago • 0 comments

我有两块GPU 0和1,除了在class Opion() 类中指定 ### 参数 self.gpu_ids=[1] 外,代码中还需要在哪块有指定,我只改了这个它显示了以下错误:(### train.ipy运行到 model.optimize_parameters()出错)。 调用CSA.py 中的224行出现报错
223 def optimize_parameters(self): --> 224 self.forward()

##报错的提示: RuntimeError: Expected tensor for argument #1 'input' to have the same device as tensor for argument #2 'weight'; but device 0 does not equal 1 (while checking arguments for cudnn_convolution)

期待您的帮助,我将不胜感激。

zhangweiweicpp avatar Oct 15 '20 12:10 zhangweiweicpp