#报错记录#RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
有numpy和torch两种类型的数据
z = mean.clone().detach() + eps * torch.exp(logstd)
源代码这边报错了,修改如下
eps = eps.cuda() z = mean.cuda()+ eps * torch.exp(logstd).cuda()
就是把和numpy有关的,比如reshape什么的后面加上cuda()

浙公网安备 33010602011771号