Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zhangweiweicpp opened this issue Oct 15, 2020 · 0 comments

Comments

@zhangweiweicpp
Copy link

我有两块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)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant