-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDebug.txt
More file actions
9 lines (8 loc) · 699 Bytes
/
Copy pathDebug.txt
File metadata and controls
9 lines (8 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
[2023.10.21] RuntimeError: mat1 and mat2 must have the same dtype, but got Double and Float
Solution: dtype=torch.float64 -> dtype=torch.float32
[2023.10.21] TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
Solution: action = self.policy_net(state).numpy() -> action = self.policy_net(state).cpu().numpy()
Solution: action = self.policy_net(state)
action = action[0].cpu().numpy()
[2023.10.21] RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x2944 and 23x128)
Solution: state = torch.tensor(state, dtype=torch.float32, device=self.device) -> state = torch.tensor([state], dtype=torch.float32, device=self.device)