-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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计算时报错(Most modules report errors when using GPU) #94
Comments
ImcwjHere
changed the title
大部分模块在使用GPU计算时报错(Most modules report errors when using GPU)
部分模块在使用GPU计算时报错(Most modules report errors when using GPU)
Nov 20, 2022
改了还是不行 |
请问还有别的方法吗,ccnet里没有list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
报错内容类似于:
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same
或者
Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper__index_select)
修复方案:
将list修改为modulelist
如model/mlp/mlp_mixer.py文件中(49行):
将self.mlp_blocks=[]修改为self.mlp_blocks=nn.ModuleList([])
The text was updated successfully, but these errors were encountered: