I have a weird issue with tensor.cuda()
, it seems as if it doesn’t always work:
self.returns = torch.zeros(self.step, 1, 1)
self.returns = self.retruns.cuda()
rewards = rewards.cuda()
masks = masks.cuda()
print(self.returns.type(), rewards.type(), masks.type())
--output: torch.FloatTensor torch.cuda.FloatTensor torch.cuda.FloatTensor
does anyone know what might be the issue?