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

3.7节报错问题 #166

Open
liyuxuanzzz opened this issue Feb 1, 2021 · 0 comments
Open

3.7节报错问题 #166

liyuxuanzzz opened this issue Feb 1, 2021 · 0 comments

Comments

@liyuxuanzzz
Copy link

报错是这一句
d2l.train_ch3(net, train_iter, test_iter, loss, num_epochs, batch_size, None, None, optimizer)
报错如下:
RuntimeError: Tensor for 'out' is on CPU, Tensor for argument #1 'self' is on CPU, but expected them to be on GPU (while checking arguments for addmm)
在源代码末尾加上.cuda()依旧报错,求解
image

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