请问这个地方的代码为什么一直报错?
报错位置第三行
错误:RuntimeError: All input tensors must be on the same device. Received cuda:0 and cpu
已知:x_c,x_p和y存储位置均为cuda:0
from inspect import Parameter
n = x_c.shape[0]
A = torch.cat([x_c,torch.ones(n, 1)], dim=1)
B = torch.cat([x_p,torch.ones(n, 1)], dim=1)
C = torch.cat([y,torch.ones(n, 1)], dim=1)